Calculation Issues

Excel COUNTA Counts Formula Cells Returning Blank Text: How to Exclude Them

Emma BrownEmma Brown Dec 2, 2026 868 views

Question details

The user needs to count cells with non-empty results while excluding formulas that return an empty string.

How to Exclude Formula Cells Returning Blank Text from an Excel Count
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet range contains formulas, some of which return empty strings.
Observed behavior
COUNTA includes formula cells even when their results appear blank.
Before you start

Identify the range you want to count and check whether its apparently blank cells contain formulas returning "". Choose an empty cell outside that range for the count.

Solution 1Recommended

Use SUMPRODUCT to Exclude Empty Formula Results in Excel

Use this formula when you want to count non-empty values and formula results without counting empty strings.

1
Select the result cell

In your Excel worksheet, click an empty cell outside the range you want to count.

2
Enter the formula

Type =SUMPRODUCT(--(A1:A100<>"")) and replace A1:A100 with your worksheet range.

3
Calculate the count

Press Enter. The result counts cells whose values are not empty strings, including numbers such as zero.

Use SUMPRODUCT to Exclude Empty Formula Results in Excel
Spaces and errors: Cells containing spaces are counted because spaces are not empty strings. Errors in the referenced range can cause the formula to return an error.
Count non-empty results

Count Non-Empty Formula Results in WPS Spreadsheet

Use SUMPRODUCT in WPS Spreadsheet to count values while excluding formulas that return empty strings.

  1. 1. Open your spreadsheet: Open WPS Spreadsheet and select File > Open to choose your workbook.
  2. 2. Choose a result cell: Click an empty cell outside the range you want to count.
  3. 3. Enter the count formula: Type =SUMPRODUCT(--(A1:A100<>"")) and replace A1:A100 with your actual range.
  4. 4. View the result: Press Enter to calculate the count of non-empty results.
Exclude empty-string formula results from countsWork with Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet formula interfaceEdit spreadsheets for free
microsoft office alternative - wps office

Frequently Asked Questions

Why does COUNTA count a formula that displays nothing?

COUNTA counts the cell because it contains a formula, even if that formula returns an empty string such as "".

Does SUMPRODUCT count cells containing zero?

Yes. In =SUMPRODUCT(--(A1:A100<>"")), zero is not an empty string, so it is counted.

Are cells containing spaces excluded from the count?

No. A space is text, not an empty string, so the formula counts it. Check the affected cells and remove unwanted spaces if they should be excluded.

What if the SUMPRODUCT formula returns an error?

Check the referenced range for cells containing errors and correct the underlying formulas or values before calculating the count again.