Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 "Daniel.C" wrote: 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 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If you're new to macros:
Debra Dalgleish has some notes how to implement macros he http://www.contextures.com/xlvba01.html David McRitchie has an intro to macros: http://www.mvps.org/dmcritchie/excel/getstarted.htm Ron de Bruin's intro to macros: http://www.rondebruin.nl/code.htm (General, Regular and Standard modules all describe the same thing.) Dabeaks wrote: 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 "Daniel.C" wrote: 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 -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Format Cells Special Telephone Number
"Dabeaks" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Yet Another Name Format Question | Excel Discussion (Misc queries) | |||
Format question | Excel Discussion (Misc queries) | |||
Format Question | Excel Discussion (Misc queries) | |||
Format question | Excel Discussion (Misc queries) | |||
Format Question Please | Excel Discussion (Misc queries) |