Add leading zeros

E

Ellen

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
 
T

Toppers

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

HTH
 
E

Ellen

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
 

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

Top