Add leading zeros

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have a CAS# field that Excel interprets as a number. As a result, all my
leading zeros are dropped. Is there a way for me to add leading zeros to any
given number to make it become 9 digits?

For instance, I'd like the following to happen:

12345 to become 000012345
123456 to become 000123456
1234567 to become 001234567
12345678 to become 012345678
123456789 to remain 123456789

Thanks to whomever can help me!!

Ellen
 
You can format the cell(s) as "000000000" (minus the quotes) and this will
insert leading zeros as required.

HTH
 
You're beautiful!! Thanks, Toppers.

Toppers said:
You can format the cell(s) as "000000000" (minus the quotes) and this will
insert leading zeros as required.

HTH
 
Back
Top