Related topics
×
Formatting
Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.
Formatting

Display or hide zero values

You may have a personal preference to display zero values in a cell, or you may be using a spreadsheet that adheres to a set of format standards that requires you to hide zero values. There are several ways to display or hide zero values.

Your browser does not support video. Install Microsoft Silverlight, Adobe Flash Player, or Internet Explorer 9.

In newer Office versions, such as Office 2013, Office 2016, Office 2019, Office 2021 and Office 365 Subscription, sometimes you might not want zero (0) values showing on your worksheets; sometimes you need them to be seen. Whether your format standards or preferences call for zeroes showing or hidden, there are several ways to make it happen.

Hide or display all zero values on a worksheet

  1. Go to File > Options > Advanced.

  2. Under Display options for this worksheet, select a worksheet, and then do one of the following:

    • To display zero (0) values in cells, check the Show a zero in cells that have zero value check box.

    • To display zero (0) values as blank cells, uncheck the Show a zero in cells that have zero value check box.

Hide zero values in selected cells

These steps hide zero values in selected cells by using a number format. The hidden values appear only in the formula bar and are not printed. If the value in one of these cells changes to a nonzero value, the value is displayed in the cell, and the format of the value will be similar to the general number format.

  1. Select the cells that contain the zero (0) values that you want to hide.

  2. You can press Ctrl+1, or on the Home tab, select Format > Format Cells.

    Format Cells on the Home tab

  3. Select Number > Custom.

  4. In the Type box, type 0;-0;;@, and then select OK.

Display hidden values

To display hidden values:

  1. Select the cells with hidden zeros.

  2. You can press Ctrl+1, or on the Home tab, select Format > Format Cells.

  3. Select Number > General to apply the default number format, and then select OK.

Hide zero values returned by a formula

  1. Select the cell that contains the zero (0) value.

  2. On the Home tab, select the arrow next to Conditional Formatting > Highlight Cells Rules Equal To.

  3. In the box on the left, type 0.

  4. In the box on the right, select Custom Format.

  5. In the Format Cells box, select the Font tab.

  6. In the Color box, select white, and then select OK.

Display zeros as blanks or dashes

Use the IF function to do this.

Data in cells A2 and A3 in an Excel worksheet

Use a formula like this to return a blank cell when the value is zero:

  • =IF(A2-A3=0,””,A2-A3)

Here’s how to read the formula. If 0 is the result of (A2-A3), don’t display 0 – display nothing (indicated by double quotes “”). If that’s not true, display the result of A2-A3. If you don’t want the cells blank but want to display something other than 0, put a dash “-“ or other character between the double quotes.

Hide zero values in a PivotTable report

  1. Select the PivotTable report.

  2. On the Analyze tab, in the PivotTable group, select the arrow next to Options, and then select Options.

  3. Select the Layout & Format tab, and then do one or more of the following:

    • Change error display -   Check the For error values show check box under Format. In the box, type the value that you want to display instead of errors. To display errors as blank cells, delete any characters in the box.

    • Change empty cell display -   Check the For empty cells show check box. In the box, type the value that you want to display in empty cells. To display blank cells, delete any characters in the box. To display zeros, clear the check box.

Top of Page

See Also

Overview of formulas in Excel

How to avoid broken formulas

Find and correct errors in formulas

Excel keyboard shortcuts and function keys

Excel functions (alphabetical)

Excel functions (by category)

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×