Adding a zero before values in an Excel spreadsheet column?

While trying to fill in social security numbers into Excel 2007, my dad found out that he couldn't make the numbers start with a zero (0).

Example: 0123456789 is turned into 123456789

What do I need to do in order for the leading zeros to stay as-is entered and not disappear?


Solution 1:

If the numbers you're inserting all have a common length, you can set a custom format on them:

alt text

So if you wanted 123456789 to turn into 0123456789, you'd use the format 0000000000.

Solution 2:

An alternative is to type a quotation mark (') and then the number.. This way the number is treated as a string, so the leading zeros are kept. (The quote won't be displayed)

Solution 3:

Excel has special formatting for Social Security Numbers.

  1. Select the cells where you want to type the SSN's
  2. Right click and choose "Format Cells"
  3. On the "Number" tab, choose "Special" (toward the bottom of the list)
  4. On the right you'll see "Social Security Number". Select it and click "OK"

When you type the SSN's in those cells, they will take leading zeros.