Format Question

  • Thread starter Thread starter Dabeaks
  • Start date Start date
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top