retain leading zeros in number format

  • Thread starter Thread starter Jeff
  • Start date Start date
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
 
000000

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
If it is always 6 digits use custom format and 000000, if you need to export
it use text
format
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top