Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
how to keep all leading zeros when stripping dashes from txt num
I have a text column that contains formatted numbers.
I need to strip the dashes, but preserve ALL numbers. When I use replace to strip the dashes, Excel automatically changes the cells to numbers format and I lose all the leading zeros. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
how to keep all leading zeros when stripping dashes from txt num
I have a text column that contains formatted numbers.
I need to strip the dashes, but preserve ALL numbers. When I use replace to strip the dashes, Excel automatically changes the cells to numbers format and I lose all the leading zeros. This seems to work... =SUBSTITUTE(A1,"-","") where you would use your own cell reference in place of the A1. Rick |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
how to keep all leading zeros when stripping dashes from txt num
Use a custom format like 000000
or how many digits you need, so if you want to display 12284567 as 012284567 and you always want to display 9 digits use a custom format of 000000000 note that if you have more than 15 digits it won't work, Excel's maximum when it comes to a number is 15 digits so you can't numerically format credit card numbers. Only text will work there -- Regards, Peo Sjoblom "Sue" wrote in message ... I have a text column that contains formatted numbers. I need to strip the dashes, but preserve ALL numbers. When I use replace to strip the dashes, Excel automatically changes the cells to numbers format and I lose all the leading zeros. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
how to keep all leading zeros when stripping dashes from txt num
Sue's is good.
Or you could format cells as Text (@) PRIOR to replacing hyphens. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why do the preceding zeros disappear when I remove dashes? | Excel Discussion (Misc queries) | |||
How can SS#s be displayed as text with all zeros and no dashes? | Excel Discussion (Misc queries) | |||
Stop Excel from stripping out leading zeros when saving as CSV | Excel Discussion (Misc queries) | |||
Stripping the dashes | Excel Discussion (Misc queries) | |||
save text field w/ leading zeros in .csv format & not lose zeros? | Excel Discussion (Misc queries) |