ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I create a leading zero in a number field, (i.e. 0301234)? (https://www.excelbanter.com/excel-worksheet-functions/119650-how-do-i-create-leading-zero-number-field-i-e-0301234-a.html)

Jim Clay

How do I create a leading zero in a number field, (i.e. 0301234)?
 
I have numbers that need to be added to my spreadsheet that contain a leading
zero, same as the subject. It is part of the number, some also have 1s or 2s
so the zero is an imporatant part of the number.

Beege

How do I create a leading zero in a number field, (i.e. 0301234)?
 
Jim Clay wrote:
I have numbers that need to be added to my spreadsheet that contain a leading
zero, same as the subject. It is part of the number, some also have 1s or 2s
so the zero is an imporatant part of the number.


Jim,

If your number is NOT calculated, i.e. a part number, then format the
cells as text.

If it IS calculated and you have a standard length (say 8 places), then
format/special/00000000

k?

Beege

toni.gee

How do I create a leading zero in a number field, (i.e. 0301234)?
 
Assuming that all the numbers contain the same number of digits (say, 7 in
your example), set the cell number format to 0000000 (via the Format - Cells
- Number - Custom option). Any numbers entered upto 7 digits in length will
be padded with leading zeros to make it 7 digits long.

"Jim Clay" wrote:

I have numbers that need to be added to my spreadsheet that contain a leading
zero, same as the subject. It is part of the number, some also have 1s or 2s
so the zero is an imporatant part of the number.



All times are GMT +1. The time now is 07:20 PM.

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