Hide or Change the Display of Blank Cells in Excel Pivot Tables
by Avantix Learning Team | Updated April 5, 2021
Applies to: Microsoft® Excel® 2013, 2016, 2019 and 365 (Windows)
When you create a pivot table in Excel, blank cells may appear if you have blanks in your data source. Sometimes, the word "blank" appears in brackets or parentheses in cells. To remove blanks in pivot tables, you can set pivot table options to display data in empty cells, filter to remove blanks, apply conditional formatting, find and replace blanks, change pivot table design settings or clean up the source data.
Note: Buttons and Ribbon tabs may display in a different way (with or without text) depending on your version of Excel, the size of your screen and your Control Panel settings. For Excel 365 users, Ribbon tabs may appear with different names. For example, the PivotTable Tools Analyze tab may appear as PivotTable Analyze and the Options button may appear in a PivotTable drop-down menu.
Recommended article: How to Delete Blank Rows in Excel (5 Easy Ways)
Do you want to learn more about Excel? Check out our virtual classroom or live classroom Microsoft Excel courses >
Displaying data for empty cells using Options
You can use the PivotTable Options dialog box to control the display of blanks. Use this method if the blanks are in the values area of the pivot table.
To set pivot table options for empty cells:
- Click in the pivot table.
- Click the PivotTable Tools Analyze tab in the Ribbon.
- Click Options in the PivotTable group. You can also right-click in the pivot table and select PivotTable Options from the drop-down menu. The PivotTable Options dialog box appears.
- Click the Layout & Format tab.
- Check For empty cells show and enter data in the entry box (such as 0). This only affects cells in the values area of the pivot table, not the row or column areas.
- Click OK.
Below is the PivotTable Options dialog box:
In the following example, note the blanks in the values area of the pivot table:
After changing pivot table options, the blanks have been replaced with zeros:
Filtering to remove blanks
Depending on the location of cells with blanks, you can filter to remove the blanks. If blanks appear in row or column heading fields, filtering can work well.
To filter to remove blanks in a row or column field:
- Click the arrow to the right of a row or column heading in the pivot table. A drop-down menu appears.
- Click to uncheck the (blank) check box. You may need to scroll to the bottom of the list.
- Click OK.
Applying conditional formatting to remove blanks
To apply conditional formatting to remove blanks in a pivot table:
- Click in the pivot table.
- Press Ctrl + A to select the cells.
- Click the Home tab in the Ribbon and click Conditional Formatting. A drop-down menu appears.
- Select New Rule. A dialog box appears.
- In the dialog box, click Format only cells that contain.
- Under Format only cells with, select Cell Value equal to and enter "(blank)".
- Click Format. A dialog box appears.
- Click the Number tab.
- Click the Custom category on the left.
- In the General area, enter three semi-colons (;;;). This will format positive, negative and zero or blank values as blank.
- Continue clicking OK until you return to the worksheet.
Below is the Conditional Formatting dialog box:
The Format Cells dialog box appears as follows:
Finding and replacing blanks
You can use the Replace command to find and replace blanks.
To find and replace blanks:
- Click in the worksheet with the pivot table.
- Click Ctrl + H to display the Replace dialog box.
- In the Find What box, enter "(blank)".
- In the Replace with box, type a space if you want to blanks to be removed or type a word such as "Other" to replace the blanks with text.
- Click Replace Al. If you want to replace specific cells, click Find Next and then Replace for each instance you want to replace.
- Click OK.
In the following example, we've replaced blanks with the word "Other":
Changing pivot table design settings
Some users may have set options to display a blank row after each group of values.
To remove blanks using pivot table design settings:
- Click in the pivot table.
- Click the PivotTable Tools Design tab in the Ribbon.
- In the Layout Group, select Blank Rows. A drop-down menu appears.
- Select Remove Blank line after each item.
Cleaning up blanks in source data
Another option is to clean up blanks in the source data and enter a value instead. You can use the Go to Special dialog box to find blanks and then enter data in the blank cells.
Below is the Go to Special dialog box:
To use Go to Special to find blanks in source data and enter values in the blank cells:
- Select the range of cells in the source data with blank cells or missing values (this range is often in one column).
- Press Ctrl + G to display the Go To dialog box and then click Special to display the Go To Special dialog box. Alternatively, you can click the Home tab in the Ribbon and then select Go to Special from the Find & Select drop-down menu.
- Select Blanks in the Go To Special dialog box and click OK. Excel will select all of the blank cells within the range.
- Type the value you want to appear in the blanks such as "0" or "Other". Do not click in a cell first. This data will be entered in the active cell.
- Press Ctrl + Enter. The data should be entered in all of the blank cells.
- Right-click in the pivot table and select Refresh.
The method you use to remove blanks in a pivot table depends on the area in which the blanks appear.
Subscribe to get more articles like this one
Did you find this article helpful? If you would like to receive new articles, join our email list.
More Resources
10 Great Excel Pivot Table Shortcuts
How to Group by Month and Year in a Pivot Table in Excel
How to Hide or Unhide Excel Worksheets (and Unhide All Sheets)
How to Fill Blanks in Excel from the Cell Above (using a Few Excel Tricks)
How To Fill Blanks in Excel with Zeros, Dashes or Other Values in an Excel Range
Related courses
Microsoft Excel: Intermediate / Advanced
Microsoft Excel: Data Analysis with Functions, Dashboards and What-If Analysis Tools
Microsoft Excel: Introduction to Visual Basic for Applications (VBA)
Our instructor-led courses are delivered in virtual classroom format or at our downtown Toronto location at 18 King Street East, Suite 1400, Toronto, Ontario, Canada (some in-person classroom courses may also be delivered at an alternate downtown Toronto location). Contact us at info@avantixlearning.ca if you'd like to arrange custom instructor-led virtual classroom or onsite training on a date that's convenient for you.
Copyright 2024 Avantix® Learning
You may also like
How to Replace Zeros (0) with Blanks in Excel
There are several strategies to replace zero values (0) with blanks in Excel. If you want to replace zero values in cells with blanks, you can use the Replace command or write a formula to return blanks. However, if you simply want to display blanks instead of zeros, you have two formatting options – create a custom number format or a conditional format.
What is Power Query in Excel?
Power Query in Excel is a powerful data transformation tool that allows you to import data from many different sources and then extract, clean, and transform the data. You will then be able to load the data into Excel or Power BI and perform further data analysis. With Power Query (also known as Get & Transform), you can set up a query once and then refresh it when new data is added. Power Query can import and clean millions of rows of data.
How to Freeze Rows in Excel (One or Multiple Rows)
You can freeze one or more rows in an Excel worksheet using the Freeze Panes command. If you freeze rows containing headings, the headings will appear when you scroll down. You can freeze columns as well so when you scroll to the right columns will be frozen.
Microsoft, the Microsoft logo, Microsoft Office and related Microsoft applications and logos are registered trademarks of Microsoft Corporation in Canada, US and other countries. All other trademarks are the property of the registered owners.
Avantix Learning |18 King Street East, Suite 1400, Toronto, Ontario, Canada M5C 1C4 | Contact us at info@avantixlearning.ca