"Tha BeatMaker" <(E-Mail Removed)>
wrote in message
news:(E-Mail Removed)...
>
> Consider this example:
>
> A1 -> 3365551111
> A2 -> 336-555-2222
> A3 -> (336) 555-3333
>
>
> I want to be able to scan through column A and change all numbers to be
> in the format of A1 which is just straight numbers...no punctuation.
>
> How would I do that?
>
>
> --
> Tha BeatMaker
> ------------------------------------------------------------------------
> Tha BeatMaker's Profile:
> http://www.excelforum.com/member.php...o&userid=23998
> View this thread: http://www.excelforum.com/showthread...hreadid=383978
I simply chose column "A" and recorded a new macro, for This Workbook - not
any other workbook type, {Called it something - RSPCHR} that replaced all
"each character one at a time" with nothing and, in the macro I changed the
format as some phone numbers came out like 3.37E+09. This recorded the code
and can be viewed in edit macro. Here is what came out.
Sub RSPCHR()
'
' RSPCHR Macro
' Macro recorded 7/1/2005 by Philippe L. Balmanno
'
'
Selection.Replace What:="-", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="(", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:=")", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.NumberFormat = "0.00"
Selection.NumberFormat = "General"
Selection.NumberFormat = "@"
End Sub