ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Why do the preceding zeros disappear when I remove dashes? (https://www.excelbanter.com/excel-discussion-misc-queries/145116-why-do-preceding-zeros-disappear-when-i-remove-dashes.html)

carridin1

Why do the preceding zeros disappear when I remove dashes?
 
I work with spreadsheets that contain list of numbers separated by dashes,
such as 001-117-251. I then have to copy these numbers into a software
program that will not accept dashes, so I would like to remove them using the
Find and Replace feature in Excel. However, when I do this any zeros at the
beginning of the number vanish, and I end up with something like this:
1117251. How do I prevent the zeros from vanishing?

Bob Phillips

Why do the preceding zeros disappear when I remove dashes?
 
It changes it to a number in which leading zeroes are suppressed.

Try formatting as '000000000'. It may lose them in the export, but try it
and see.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"carridin1" wrote in message
...
I work with spreadsheets that contain list of numbers separated by dashes,
such as 001-117-251. I then have to copy these numbers into a software
program that will not accept dashes, so I would like to remove them using
the
Find and Replace feature in Excel. However, when I do this any zeros at
the
beginning of the number vanish, and I end up with something like this:
1117251. How do I prevent the zeros from vanishing?




David Biddulph[_2_]

Why do the preceding zeros disappear when I remove dashes?
 
If the export loses the leading zeroes, try using a helper column
=TEXT(A1,"000000000")
--
David Biddulph

"Bob Phillips" wrote in message
...
It changes it to a number in which leading zeroes are suppressed.

Try formatting as '000000000'. It may lose them in the export, but try it
and see.


"carridin1" wrote in message
...
I work with spreadsheets that contain list of numbers separated by dashes,
such as 001-117-251. I then have to copy these numbers into a software
program that will not accept dashes, so I would like to remove them using
the
Find and Replace feature in Excel. However, when I do this any zeros at
the
beginning of the number vanish, and I end up with something like this:
1117251. How do I prevent the zeros from vanishing?




carridin1

Why do the preceding zeros disappear when I remove dashes?
 
That works, thanks guys!

"carridin1" wrote:

I work with spreadsheets that contain list of numbers separated by dashes,
such as 001-117-251. I then have to copy these numbers into a software
program that will not accept dashes, so I would like to remove them using the
Find and Replace feature in Excel. However, when I do this any zeros at the
beginning of the number vanish, and I end up with something like this:
1117251. How do I prevent the zeros from vanishing?



All times are GMT +1. The time now is 11:14 PM.

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