retain leading zeros in number format

J

Jeff

I'm sure this must be a basic question: I need to have numbers in a
particular column which begin with three leading zeros as in 000123 but
Excel automatically discards them. I can't find a format in the number
category which retains them. How do I do it please?

Thanks
 
P

Peo Sjoblom

If it is always 6 digits use custom format and 000000, if you need to export
it use text
format
 
B

BobT

If formatting doen't help you can use ="000"&A1
Where A1 is the number that won't hold its lead zeroes

I've used the following for 5 digits zip codes when mail
merge in Word won't hold the lead zeroes in the Northeast
(US)
=IF(LEN(A1)<2,0,"")&IF(LEN(A1)<3,0,"")&IF(LEN(A1)<4,0,"")
&IF(LEN(A1)<5,0,"")&A1

If any you wish to improve this please post it.
 
Top