+ Reply to Thread
Results 1 to 3 of 3

Add leading zeros

  1. #1
    Ellen
    Guest

    Add leading zeros

    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

  2. #2
    Toppers
    Guest

    RE: Add leading zeros

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

    HTH


    "Ellen" wrote:

    > 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


  3. #3
    Ellen
    Guest

    RE: Add leading zeros

    You're beautiful!! Thanks, Toppers.

    "Toppers" wrote:

    > You can format the cell(s) as "000000000" (minus the quotes) and this will
    > insert leading zeros as required.
    >
    > HTH
    >
    >
    > "Ellen" wrote:
    >
    > > 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


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1