Thread: Format Question
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Daniel.C[_3_] Daniel.C[_3_] is offline
external usenet poster
 
Posts: 133
Default Format Question

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

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