format string

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
 
J

Jacob Skaria

In cell A1
1123-456-7890

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

If this post helps click Yes
 
D

Dave Peterson

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)
 

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

Top