Format Question

D

Dabeaks

Hello,

I have a whole bunch of phone numbers listed in the following format:

###.###.####

Is there a way to change all of them to this format:

(###) ###-###

Please help
 
D

Daniel.C

Hello.
Try the following macro :

Sub test()
Dim c As Range
For Each c In Selection
If c.NumberFormat = "###"".""###"".""####" Or _
c.NumberFormat = "###\.###\.####" Then
c.NumberFormat = "(###) ###-###"
End If
Next c
End Sub

HTH
Daniel
 
D

Dabeaks

Daniel,

Maybe I'm doing it wrong. but I copied and pasted that into the "record
Macro" description. I also enabled the Macros. Nothing changed at all after
this. Am I missing a step? This is the first time I'm using Macros in excel.

Adam
 
Top