ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   remove -, keep 0 in phonenumber (https://www.excelbanter.com/excel-worksheet-functions/113617-remove-keep-0-phonenumber.html)

sofie

remove -, keep 0 in phonenumber
 
I need to format phonenumbers of the type 045-69825 to 04569825.
When I try the search and replace for the -, I lose the 0 in the beginning
of the number. I treid formating the cells to text first, but the 0 still
goes away.

Help, anyone?



Roger Govier

remove -, keep 0 in phonenumber
 
Hi Sofie

One way
=TEXT(SUBSTITUTE(A1,"-",""),"00000000")

--
Regards

Roger Govier


"sofie" wrote in message
...
I need to format phonenumbers of the type 045-69825 to 04569825.
When I try the search and replace for the -, I lose the 0 in the
beginning
of the number. I treid formating the cells to text first, but the 0
still
goes away.

Help, anyone?





sofie

remove -, keep 0 in phonenumber
 
Thanx, I'll try that!

"Roger Govier" skrev:

Hi Sofie

One way
=TEXT(SUBSTITUTE(A1,"-",""),"00000000")

--
Regards

Roger Govier


"sofie" wrote in message
...
I need to format phonenumbers of the type 045-69825 to 04569825.
When I try the search and replace for the -, I lose the 0 in the
beginning
of the number. I treid formating the cells to text first, but the 0
still
goes away.

Help, anyone?







All times are GMT +1. The time now is 04:47 PM.

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