Pages

Wednesday, September 18, 2013

Keep your numbers′ leading zeros in Excel (2003/2007)

If you need to enter the Zip code 02364 in your Excel spreadsheet, you′ll probably throw your hands up when Excel automatically changes the value to 2364. Your Zip code must have five digits, but by default Excel doesn′t display leading zeros.

Here′s the solution: Create a custom number format with five digits. This custom format forces Excel to display leading zeros.

To create a custom number format that keeps leading zeros intact:
  1. Select the cell(s) in which you must show leading zeros, such as the column in which you′re storing Zip codes.
  2. Press [Ctrl]1 to open the Format Cells dialog box.
  3. Select Custom from the Category list box.
  4. In the Type text box, enter 00000. This forces Excel to display five digits.
  5. Click OK to apply the change.
Now when you type a number in your newly formatted cells that starts with a zero, Excel preserves the zero instead of automatically hiding it.


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.