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.What do you want to do?
Display or hide all zero values on a worksheet
Use a number format to hide zero values in selected cells
Use a conditional format to hide zero values returned by a formula
Use a formula to display zeros as a blanks or dashes
Hide zero values in a PivotTable report
Display or hide all zero values on a worksheet
- Click the
Microsoft Office Button
, click Excel Options, and then click theAdvancedcategory. - Under
Display options for this worksheet, select a worksheet, and then do one of the following:-
To display zero (0) values in cells, select the
Show a zero in cells that have zero valuecheck box. -
To display zero values as blank cells, clear the
Show a zero in cells that have zero valuecheck box.
-
Use a number format to hide zero values in selected cells
Caution Follow this procedure to hide zero values in selected cells. If the value in one of these cells changes to a nonzero value, the format of the value will be similar to the general number format.
- Select the cells that contain the zero (0) values that you want to hide.
- On the
Hometab, in theCellsgroup, clickFormat, and then clickFormat Cells. - In the
Categorylist, clickCustom. - In the
Typebox, type0;-0;;@
Notes:
- The hidden values appear only in the formula bar
- or in the cell if you edit within the cell - and are not printed.
- On the
Hometab, in theCellsgroup, clickFormat, and then clickFormat Cells. - To display hidden values again, select the cells, and then on the
Hometab, in theCellsgroup, point toFormat, and clickFormat Cells. In theCategorylist, clickGeneralto apply the default number format. To redisplay a date or a time, select the appropriate date or time format on theNumbertab.
Use a conditional format to hide zero values returned by a formula
- Select the cell that contains the zero (0) value.
- On the
Hometab, in theStylesgroup, click the arrow next toConditional Formatting, point toHighlight Cells Rules, and then clickEqual To. - In the box on the left, type
0. - In the box on the right, select
Custom Format. - In the
Format Cellsdialog box, click theFonttab. -
In the
Colorbox, select white.
Use a formula to display zeros as blanks or dashes
To do this task, use the IF function.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example
- Create a blank workbook or worksheet.
- Select the example in the Help topic.
Note Do not select the row or column headers.
Selecting an example from Help
- Press CTRL+C.
- In the worksheet, select cell A1, and press CTRL+V.
- To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the
Formulastab, in theFormula Auditinggroup, click theShow Formulasbutton.
|
|
Function details
Hide zero values in a PivotTable report
- Click the PivotTable report.
- On the
Optionstab, in thePivotTable Optionsgroup, click the arrow next toOptions, and then clickOptions. - Click the
Layout & Formattab, and then do one or more of the following:Change error display Select the
For error values, showcheck box underFormat. 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 Select the
For empty cells, showcheck 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.
![]()