Excel COUNTA Counts Formula Cells Returning Blank Text: How to Exclude Them
Question details
The user needs to count cells with non-empty results while excluding formulas that return an empty string.

- 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.
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.
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.
In your Excel worksheet, click an empty cell outside the range you want to count.
Type =SUMPRODUCT(--(A1:A100<>"")) and replace A1:A100 with your worksheet range.
Press Enter. The result counts cells whose values are not empty strings, including numbers such as zero.

Count Non-Empty Formula Results in WPS Spreadsheet
Use SUMPRODUCT in WPS Spreadsheet to count values while excluding formulas that return empty strings.
- 1. Open your spreadsheet: Open WPS Spreadsheet and select File > Open to choose your workbook.
- 2. Choose a result cell: Click an empty cell outside the range you want to count.
- 3. Enter the count formula: Type =SUMPRODUCT(--(A1:A100<>"")) and replace A1:A100 with your actual range.
- 4. View the result: Press Enter to calculate the count of non-empty results.

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.




