Chart & Visualization Issues

Exclude Blank Cells from Excel Counts and Pie Charts

Algirdas JasaitisAlgirdas Jasaitis Dec 2, 2026 868 views

Question details

Count repeated values and create a pie chart without including blank cells or unused rows.

Exclude Blank Cells from Excel Counts and Pie Charts
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains a list of records with unused rows, and the user wants to chart the frequency of each populated value.
Observed behavior
The desired result is a count summary and pie chart based only on populated values.
Before you start

Identify the column containing the values to count and reserve two empty columns for the unique labels and their counts. Adjust the example sheet name and cell ranges to match your workbook.

Solution 1Recommended

Count Nonblank Values and Chart a Summary Table in Excel

Use COUNTIFS to count each populated value, then chart only the filled summary rows.

1
Create a label list

Copy the values from 'MY TRADING JOURNAL'!E11:E1070 into an empty summary column, such as M. Select the copied list and choose Data > Remove Duplicates, then delete any blank entry.

2
Count each value

In N3, enter =COUNTIFS('MY TRADING JOURNAL'!$E$11:$E$1070,M3,'MY TRADING JOURNAL'!$E$11:$E$1070,"<>") and fill the formula down beside the labels. Add headers above the labels and counts.

3
Insert the pie chart

Select the headers and populated label-and-count rows, then choose Insert > Pie Chart. Do not include unused summary rows in the selection.

4
Update the chart when needed

When new labels appear, add them and their count formulas to the summary. Right-click the chart, choose Select Data, and adjust the chart data range to include the populated rows.

Count Nonblank Values and Chart a Summary Table in Excel
Counting duplicates: The formula counts every occurrence of each label. To chart only repeated values, include only summary rows with counts greater than 1 in the chart source.
Create a clean chart

Count Nonblank Values and Build a Pie Chart in WPS Spreadsheets

Use COUNTIFS in WPS Spreadsheets to summarize populated values, then select the filled summary rows to create a pie chart.

  1. 1. Open the workbook: Open WPS Spreadsheets and use File > Open to select your workbook.
  2. 2. List the labels: In an empty column, enter each nonblank value you want to count once, with a header above the list.
  3. 3. Calculate the counts: In the adjacent column, enter =COUNTIFS('MY TRADING JOURNAL'!$E$11:$E$1070,M3,'MY TRADING JOURNAL'!$E$11:$E$1070,"<>") and fill it down. Change the references to match your sheet and label column.
  4. 4. Create the chart: Select the populated labels and counts, including their headers, and choose Insert > Chart > Pie.
Count repeated values while excluding blank cellsCreate a pie chart from a concise summary rangeOpen and edit Microsoft Excel XLSX and XLS filesWork with a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

How do I count a value without counting blank cells?

Use COUNTIFS with the value as one criterion and "<>" as a second criterion on the same range. For example, =COUNTIFS(E11:E1070,M3,E11:E1070,"<>") counts nonblank cells matching M3.

How can I show only duplicates in my pie chart?

Count each unique label, then select only labels with counts greater than 1 and their corresponding counts when you insert the pie chart.

Will an Excel Table automatically remove blanks from a chart?

No. A table can expand when you add rows, but you should remove blank labels from the summary or otherwise exclude them from the chart source.

How do I change the rows included in an existing chart?

Right-click the chart, choose Select Data, and change the chart data range to cover only the populated labels and counts.