Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Mar 2004
    Location
    North Carolina, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Zeros at Beginning of Numbers (Excel 2000)

    Hi, I have a list of numbers that are associated with people that were imported from SQL. After substantial analysis, etc., I realized that leading zeros were omitted. For example, 002335 (SQL) now appears as 2335. 012335 (SQL) now appears as 12335. Is there a way I can add 2 zeros to the beginning of all numbers in a particular row that are only 4 digits long and add 1 zero to the beginning of all with only 5 digits?

    Please let me know if there is any easy way to do this.

    Thanks.

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Posts
    3,788
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Zeros at Beginning of Numbers (Excel 2000)

    Assuming the values are entered as numbers and not text then you can use the custom number format 000000 to display them with leading zeros.

  3. #3
    3 Star Lounger
    Join Date
    Mar 2004
    Location
    North Carolina, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Zeros at Beginning of Numbers (Excel 2000)

    Ok. But assuming they are currently missing in the data, is there an easy way to append them based on what I described?

  4. #4
    Platinum Lounger
    Join Date
    Jan 2001
    Posts
    3,788
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Zeros at Beginning of Numbers (Excel 2000)

    If the number you want to change is in cell A1 you could use a formula like:
    <code>=TEXT(A1,"000000")</code>
    This will change the numbers to text and include the leading zeros. The method I described in the earlier post keeps them as numbers but displays the leading zeros.

  5. #5
    3 Star Lounger
    Join Date
    Mar 2004
    Location
    North Carolina, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Zeros at Beginning of Numbers (Excel 2000)

    Awesome. I think this has me fixed!!!!!!!

    Thanks! [img]/forums/images/smilies/smile.gif[/img]

Posting Permissions

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