formula for telephone numbers.
Here's what I do. Select the cells you want to change and run this
macro.
Sub Convert_Phone()
Application.ScreenUpdating = False
With Selection.SpecialCells(xlConstants)
.Replace what:=Chr(160), Replacement:="", lookat:=xlPart,
searchorder:=xlByColumns, MatchCase:=True
.Replace what:=Chr(32), Replacement:="", lookat:=xlPart,
searchorder:=xlByColumns, MatchCase:=True
.Replace what:=")", Replacement:="", lookat:=xlPart,
searchorder:=xlByColumns, MatchCase:=True
.Replace what:="(", Replacement:="", lookat:=xlPart,
searchorder:=xlByColumns, MatchCase:=True
.Replace what:="-", Replacement:="", lookat:=xlPart,
searchorder:=xlByColumns, MatchCase:=True
.Replace what:="+", Replacement:="", lookat:=xlPart,
searchorder:=xlByColumns, MatchCase:=True
.Replace what:=".", Replacement:="", lookat:=xlPart,
searchorder:=xlByColumns, MatchCase:=True
.Replace what:="'", Replacement:="", lookat:=xlPart,
searchorder:=xlByColumns, MatchCase:=True
End With
Application.ScreenUpdating = True
End Sub
HTH,
JP
On Nov 2, 2:07 pm, biffula wrote:
I have a list of thousands of phone numbers. I have been trying
various formulas to no success. My phone numbers look like this:
(123)456-7890
and I need them to look like this:
1234567890
They are in columns. Thanks.
|