How to Keep Zeros in Excel: A Step-by-Step Guide

Keeping zeros in Excel might seem tricky, but it’s pretty simple once you get the hang of it. Whether you’re working with product codes, zip codes, or any number where leading zeros are important, Excel has got you covered. Let’s dive in and learn how to keep those pesky zeros from disappearing.

Step by Step Tutorial: Keeping Zeros in Excel

Before we jump into the steps, it’s good to know that Excel automatically removes leading zeros because it treats numbers as numerical data. However, by following these steps, you’ll be able to format your cells so that the leading zeros are retained.

Step 1: Select the cells where you want to keep the zeros

Click and drag to highlight the cells where you need to keep the leading zeros.

Step 2: Open the Format Cells dialog box

Right-click on the selected cells and choose ‘Format Cells’ from the context menu, or press Ctrl+1 on your keyboard.

Step 3: Choose the ‘Text’ format

In the Format Cells dialog box, click on the ‘Number’ tab, then select ‘Text’ from the Category list.

After completing these steps, any number you type into the formatted cells will retain its leading zeros. The ‘Text’ format tells Excel to treat the input as text, not numbers, so it won’t strip away any characters.

What Happens Next

Once you’ve formatted your cells as text, any data you enter will be exactly as you typed it, zeros and all. This is particularly useful when dealing with IDs, codes, or any data that requires a specific format.

Tips for Keeping Zeros in Excel

  • If you’re entering a new number and want to keep the leading zeros, start by typing an apostrophe (‘) before the number.
  • You can also use a custom format by entering zeros in the format code section. For example, if you want to display a five-digit number, use the format ‘00000’.
  • Remember, formatting cells as text before entering data will save you time in the long run.
  • If you’re importing data from another source, check the import settings to ensure leading zeros are not removed.
  • When working with formulas, be aware that text-formatted cells might not be calculated correctly. Consider using the VALUE function to convert text to numbers if necessary.

Frequently Asked Questions

How do I keep a zero before a decimal in Excel?

If you type a leading zero before a decimal point, Excel will retain it automatically, as it’s a valid numerical format.

Can I keep trailing zeros in Excel?

Yes, you can format the cell to show a specific number of decimal places, which will show trailing zeros.

What if I want to keep zeros in the middle of a number?

Zeros in the middle of a number are automatically kept by Excel since they are significant to the value of the number.

Can I apply the ‘Text’ format to an entire column?

Absolutely, just click on the column header to select the entire column before following the formatting steps.

Will formatting cells as text affect my ability to calculate sums?

Yes, text-formatted cells are not calculated in sums or other numerical formulas. You’ll need to convert them back to numbers if needed.


  1. Select the cells you want to format.
  2. Open the Format Cells dialog box.
  3. Choose the ‘Text’ format to retain leading zeros.


Keeping zeros in Excel might not be the flashiest skill, but it’s essential for anyone working with data that requires precision, like accounting, inventory, or any field that uses special codes. Remember, Excel is a powerful tool, but it’s not a mind reader. It’s up to you to tell Excel exactly how you want your data to be treated, whether it’s as plain text or a specific number format. By following the simple steps outlined above, you ensure that your data stays accurate and displays exactly how you need it to.

With these skills in your toolkit, you can say goodbye to the frustration of disappearing zeros and hello to flawless data presentation. Plus, now that you know how to keep zeros in Excel, you can pass on the knowledge to others who might be struggling with the same issue. Sharing is caring, right? So go ahead, spread the word, and keep those zeros in line!

Join Our Free Newsletter

Featured guides and deals

You may opt out at any time. Read our Privacy Policy