Employee data can look perfect until you notice the ID column. You expect a six-digit ID number, but Excel shows something shorter because the stripped zeros are gone. The fix is simple, you can add leading zeros in Excel with Custom formatting, and you can set it up once for a whole range so it keeps working as you add employees.

Spot the problem in your employee ID column

The issue shows up when an ID is supposed to start with zeros. Excel treats the entry like a normal number, so it drops anything in front.

Excel worksheet showing Employee_ID column without leading zeros before applying custom number formatting.

Here’s the situation in plain terms:

  • IDs are meant to be six digits long.
  • Some IDs begin with zeros.
  • Those leading zeros don’t show after entry.

An ID like 000123 ends up displayed as 123, which breaks consistency and can cause trouble in exports, lookups, or reporting.

What “six digits” means in practice

A six-digit ID always has six characters. If the real value is 123, the display still needs to be 000123. The number of digits stays consistent across the whole list.

Why Excel removes the zeros

Excel assumes the ID is a number, not a code. For numbers, leading zeros don’t change the value, so Excel hides them.

Why Custom formatting is the fastest fix

Custom number formats change how a value displays without changing the value itself. That makes it the easiest way to add leading zeros in Excel for an ID field like this.

It also works well in a list because you can format a large block of rows one time, then new entries in that block follow the same format.

Why format a large range up front

As said in the walkthrough, “select a whole bunch of rows so we don’t have to do this as we add employees.” That one step saves repeat work later.

Step-by-step: Add leading zeros in Excel with Custom formatting

Excel Format Cells dialog box showing Custom number format with 000000 entered to add leading zeros.

Follow these steps as written, including the exact range and shortcut.

  1. Select the ID range: Click the Name Box (next to the formula bar), type A2:A1000, then press Enter.
    (This grabs many rows at once, so you’re covered as the list grows.)
  2. Open Format Cells: Press Ctrl+1.
    Use the top of our keyboard numbers, “not on our keypad.”
  3. Choose the Custom category: In the Format Cells window, click Custom.
  4. Enter the six-digit format: In the Type box, enter 000000.
  5. Confirm the preview: If your IDs are shorter, the sample should now show leading zeros. As described, “as you can see, it adds the three leading zeros.”
  6. Apply the format: Click OK.

At this point, the ID column displays with six digits, including zeros at the start.

Why the format is 000000 (and not just 000)

It’s easy to think you only need to add the leading zeros in Excel. In this case the ID “is a six-digit number that begins with zeros.” When you type only three zeros in Custom formatting, “nothing happened,” because Excel needs the full pattern length.

So you build it like this:

  • Three zeros for the leading part you want to force
  • Three more zeros to reach a total of six digits

That’s why 000000 is the correct Custom format for a six-digit ID.

Check your work by adding a new employee

After you apply the format to A2:A1000, test it right away. Type a new ID in that range using the digits you have.

You should see two results:

  • Zeros appear automatically in front.
  • You don’t need to reformat each time.

This is the main payoff of selecting a large range first. The formatting is already waiting for the next entry.

When this trick works best (and a key limit)

This approach works for “any field that is not calculated that needs leading zeros.” In other words, it’s a great fit for code-like values you type in, even when they look like numbers.

Examples of where you might add leading zeros in Excel the same way include product codes and account numbers, as long as the cells are not driven by a formula.

The limit: calculated fields

If a column is calculated (based on formulas), the display rules can get trickier. The core rule stays simple: this method is meant for values you enter directly, not calculated outputs.

Conclusion

Leading zeros are easy to lose and annoying to fix one-by-one. Custom formatting makes the ID column consistent, and it keeps working for new entries in the formatted range. If you need to add leading zeros in Excel, set the range first, use Ctrl+1, then apply 000000. Follow along for more Microsoft Excel and Microsoft 365 tutorials.

Get Started with Microsoft 365

Be sure to subscribe to my YouTube Channel for more Microsoft Excel and Microsoft 365 Tutorials.

This page may contain affiliate links. These are tools I personally use and love. I may receive a small commission should you make a purchase using one of these links. This helps keep the tutorials and website posts coming and up to date. Thank you for your support! For more information please see my full disclaimer.

LEAVE A REPLY

Please enter your comment!
Please enter your name here
Captcha verification failed!
CAPTCHA user score failed. Please contact us!