Changing the Format of Empty Cells
Problem
You have a PivotTable with empty cells and want to change their format to display zeros or N/A.
Solution
If a PivotTable has no value for a particular cell, that cell remains empty by default. However, you can change the default format to replace empty cells with a specified number or text value by following these steps:
-
Select a cell in the PivotTable and choose PivotTable Analyze ⇒ PivotTable ⇒ Options to open the PivotTable Options dialog box.
-
In the Layout & Format tab, ensure that the “For empty cells show” check box is checked; then specify the number or text you want the PivotTable to display in any empty cells. To display a zero, for example, you’d type 0.
-
Click OK to close the dialog box and update the PivotTable.
Discussion
This recipe provides a quick way of changing how a PivotTable displays cells with no values. It’s convenient when combined with Recipe 11.19 because you can format any group’s values with no available data.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access