

This will open the Format Cells dialog box. Go to Home → Number Group and click on the dialog launcher (a small tilted arrow in the bottom right).Select the cells in which you want to add leading zeroes.Here are the steps to use this technique to add leading zeroes in Excel: To add leading zeroes, we can format it to show it that way, while the underlying value would remain unchanged. It’s only the way it’s displayed that is changed. In all the different ways to display the number, the value of the number never changes. For example, I can display the number 1000 as 1000 or 1,000 or 1000.00 or 001000 or 26-09-1902 (even dates are numbers in the backend in Excel). When you display a number in a specific format, it doesn’t change the underlying value of the number.


When to Use: When you have a numeric dataset, and you want the result to be numeric (not text). Add Leading Zeros by Using Custom Number Formatting For example, SUM/COUNT function would ignore the cell since it’s in the text format. Now, when you enter leading zeroes manually, Excel would readily comply.Ĭaution: When you convert the format to Text, some Excel functions will not work properly. Go to Home → Number Group and select Text from the drop-down.Select the cells in which you want to manually add leading zeroes.So, to get the work done without bending Excel rules, you’ll have to take advantage of the fact that this rule doesn’t apply to text formatting. Now as frustrating as it may be for you, Excel has its reasons. This happens as Excel understands that 00001 and 1 are the same numbers and should follow the same display rules. So you try and change the id by entering leading zeroes (00001 instead of 1).īut to your amazement, Excel converts it back to 1. Suppose you have employee Ids of the marketing department as shown below and you want to make these Ids look consistent by adding leading zeroes.

When to Use: When you have a small numeric data set, and you plan to do this editing manually.
#Leading 0 disappears in excel switch zip to 5 digits how to
CauseĮxcel follows the IEEE 754 specification for how to store and calculate floating-point numbers. In this situation, Excel changes the last digit to a zero. For example, you type a credit card ID number in the following format: When you type a number that contains more than 15 digits in a cell in Microsoft Excel, Excel changes any digits past the fifteenth place to zeros.
