Fix Excel SUM(COUNTIFS) Returning Zero for Text Criteria
Question details
Find out why SUM(COUNTIFS) returns zero for text criteria after source data is moved to another workbook or file.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A formula counts text values in source data that has been moved to another workbook or file.
- Observed behavior
- The SUM(COUNTIFS) formula returns zero instead of the expected count.
Open the workbook containing the formula and locate the new source data. Identify the columns, rows, and text values the formula should count.
Check the Source References and Criteria Ranges
Use this approach first after moving data to confirm the formula points to the intended cells.
Select the cell returning zero and examine its references in the formula bar. Check that each reference points to the correct workbook, sheet, and data column.
In the formula bar, replace references to the old source with references to the new source. You can select the intended cells in the open source workbook while editing the formula.
Check that every criteria range within a COUNTIFS function has the same number of rows and columns. For example, pair A2:A100 with B2:B100, not B2:B99.
In an empty cell, enter a single-condition test such as =COUNTIFS(A2:A100,"Open"), replacing the range and text with your actual source cells and criterion.
Once the first test returns the expected count, add another condition, such as =COUNTIFS(A2:A100,"Open",B2:B100,"East"). Then check each COUNTIFS component of the SUM formula separately.

Clean Hidden Characters from Text Values
Use this solution when a correctly referenced range contains text that appears to match but is not counted.
Check COUNTIFS Text Criteria in WPS Spreadsheets
Open the workbook in WPS Spreadsheets to inspect references, test COUNTIFS conditions, and clean text values before totaling the results.
- 1. Open the workbook: In WPS Spreadsheets, choose Open and select the Excel workbook containing the formula. Open the source workbook too if the formula refers to a separate file.
- 2. Check references: Select the formula cell and inspect its references in the formula bar. Update the workbook, sheet, and cell ranges if the source data has moved.
- 3. Test a criterion: In an empty cell, enter =COUNTIFS(A2:A100,"Open"), replacing the range and criterion with your own. Add further criteria only after the first count is correct.
- 4. Clean text if needed: In a helper column, enter =TRIM(CLEAN(SUBSTITUTE(A2,CHAR(160)," "))) and fill it down. Point COUNTIFS to the cleaned range and check the result.

Frequently Asked Questions
Why does COUNTIFS return zero when the text looks correct?
The source text may contain extra spaces or hidden characters, or the formula may point to the wrong range. Compare lengths with LEN and test a cleaned helper column using TRIM, CLEAN, and SUBSTITUTE.
Do COUNTIFS criteria ranges have to be the same size?
Yes. Within each COUNTIFS function, the criteria ranges must have matching dimensions. For example, A2:A100 and B2:B100 are compatible ranges.
How can I check which condition is causing the zero result?
Enter a COUNTIFS formula with just the first range and criterion in an empty cell. Add each remaining range and criterion one at a time, checking the result after each addition.
Does COUNTIFS distinguish uppercase from lowercase text?
No. COUNTIFS text matching is generally case-insensitive, so a criterion of "Open" also matches "OPEN". Extra spaces and other characters can still prevent a match.
How can I count either of two text values?
Add separate counts in a SUM formula, such as =SUM(COUNTIFS(A2:A100,"Open"),COUNTIFS(A2:A100,"Pending")). Replace the range and values with those in your workbook.




