Format a Telephone number

  • Thread starter Thread starter LeeE
  • Start date Start date
L

LeeE

I want to format the telephone numbers in my excel file so that all look like
this:
508-567-3992 Eg: ###-###-####
Some have parenthesis around the first 3 digits, some have periods after the
3 digits.
I tried creating a custom type in numbers but I think it needs to be a
formula.

Can anyone help?

Thanks
Lee
 
You could use something like:
[Blue](000)_-000-0000
as a custom format. I like the blue because it makes it easier to spot
the failures :)
Note that this format will not like ANY non-digit characters
(including hypens).
 
Here is one way...

=TEXT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"
",""),")",""),"(",""),".",""),"-",""),"000-000-0000")

Hope this helps,

Hutch
 
Back
Top