ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Leading "0" (https://www.excelbanter.com/excel-worksheet-functions/149528-leading-0-a.html)

Barbara

Leading "0"
 
I need to make a number in one cell, 0,108,250.500, to be without commas or
decimal place, 0108250500, in a new cell. I can make the change with no
problem to take out the commas and decimal (and this is done with a simple
macro, as there will be a long column of these numbers to convert), but I am
having problems figuring out how to get the leading "0".

Thanks for any help anyone can offer.


David Biddulph[_2_]

Leading "0"
 
Format the cell as text before you put the number in, or format as
0000000000, or use =TEXT(A1,"0000000000")
--
David Biddulph

"Barbara" wrote in message
...
I need to make a number in one cell, 0,108,250.500, to be without commas or
decimal place, 0108250500, in a new cell. I can make the change with no
problem to take out the commas and decimal (and this is done with a simple
macro, as there will be a long column of these numbers to convert), but I
am
having problems figuring out how to get the leading "0".

Thanks for any help anyone can offer.




Dave Peterson

Leading "0"
 
Can you just give the range of cells a custom format to show leading 0's?

format|Cells|number tab|Custom category:
0000000000



Barbara wrote:

I need to make a number in one cell, 0,108,250.500, to be without commas or
decimal place, 0108250500, in a new cell. I can make the change with no
problem to take out the commas and decimal (and this is done with a simple
macro, as there will be a long column of these numbers to convert), but I am
having problems figuring out how to get the leading "0".

Thanks for any help anyone can offer.


--

Dave Peterson


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

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