

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.

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. Add Leading Zeros by Using Custom Function (VBA)Īdd Leading Zeros by Converting the Format to Text.Add Leading Zeros by Using REPT and LEN Functions.Add Leading Zeros by Using TEXT Function.Add Leading Zeros by Using Custom Number Formatting.Add Leading Zeros by Converting the Format to Text.
