Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using the following macro to format phone numbers from "1234567890" to
"123-456-7890". While this works fine on single cells when I try it on a list it deletes the numbers and inserts the dashes "--". What is wrong with this? Thanks. Sub InsertDashes() Set r = Selection v = r.Text v = Left(v, 3) & "-" & Mid(v, 4, 3) & "-" & Right(v, 4) r.Value = v End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there something wrong with my code? | Excel Programming | |||
What is wrong with this code? | Excel Programming | |||
What is wrong with this code? | Excel Programming | |||
What's wrong with this code, please? | Excel Programming | |||
What's wrong w/my code? | Excel Programming |