format string

  • Thread starter Thread starter Rusty
  • Start date Start date
R

Rusty

I have a string imported from a ".csv file (phone number) as follows. "=1
123-456-7890).

I need to end up with a string formated as a # as followes (11234567890).
Can someone help this old man with a fancy hi-tech way of doen this. :-(

thanks
 
In cell A1
1123-456-7890

In cell B1 enter formula
=--SUBSTITUTE(A1,"-",)

If this post helps click Yes
 
If you really imported the data as formulas, then you may need to select that
range and do:
Edit|Copy
followed by
Edit|paste special|Values

After that, you could select the range to fix (a single column???)

And do multiple edit|replace's
One to replace the hyphens with nothing
one to replace the ('s with nothing
one to replace the )'s with nothing
(Repeat for any other character you want to remove)

After you've removed all the "invalid" characters, you could format the cells:
Format|cells|number tab
Custom category:
type:
(00000000000)
(or whatever format you like)
 
Back
Top