ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   format string (https://www.excelbanter.com/excel-discussion-misc-queries/244639-format-string.html)

Rusty

format string
 
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
--
rustyrunrite

Jacob Skaria

format string
 
In cell A1
1123-456-7890

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

If this post helps click Yes
---------------
Jacob Skaria


"Rusty" wrote:

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
--
rustyrunrite


Dave Peterson

format string
 
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)

Rusty wrote:

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
--
rustyrunrite


--

Dave Peterson


All times are GMT +1. The time now is 10:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com