+ Reply to Thread
Results 1 to 4 of 4

How to add zeros to the beginning of a number

  1. #1
    Registered User
    Join Date
    10-22-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    23

    How to add zeros to the beginning of a number

    Hello,

    Can someone please help with adding zeros to the front of a number? Each cell needs to be 12 digits. Any cell with less than 12 digits need zeros in front. Examples below:

    CURRENTLY: 4122235443 (10-digits)
    NEEDS TO BE: 004122235443 (12-digits)

    CURRENTLY: 57655599900 (11-digits)
    NEEDS TO BE: 057677799900 (12-digits)

    CURRENTLY: 108877443322 (12-digits)
    NEEDS TO BE: no changes needed

    Thanks in advance!

  2. #2
    Registered User
    Join Date
    07-03-2007
    MS-Off Ver
    2003
    Posts
    77

    Re: How to add zeros to the beginning of a number

    Select the cells that you want to format. Then right click, select format cell. On the number tab, choose custom for the category, then in the box that says "type" put 0's for the number of digits that you want your number to be.

    i.e. 000000 for a six digit number

  3. #3
    Registered User
    Join Date
    10-22-2009
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: How to add zeros to the beginning of a number

    Thanks for the quick reply. It did, in fact, work however when I click on the cell with the zero in front, the formula bar shows it without the zero (although the cell shows the zero). Is there a way I can get it so it shows the zero on the formula bar as well? I tried the copy and paste special (values) but that didn't work.

    Thanks again!

  4. #4
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: How to add zeros to the beginning of a number

    [QUOTE]It did, in fact, work however when I click on the cell with the zero in front, the formula bar shows it without the zero (although the cell shows the zero). Is there a way I can get it so it shows the zero on the formula bar as well? I tried the copy and paste special (values) but that didn't work.[/
    QUOTE]
    The leading zeros are, obviously, place holders and have no numerical significance. The formula bar only shows the actual underlying value of a cell regardless of formatting.

    It's not clear why you would need or even want the leading zeros to show in the formula bar, but to do so requires formatting the applicable cells to text (not recommended, though - numbers should remain numbers).
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

+ 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