How to Fix COUNTIFS Counting Blank Cells as 10 in Spreadsheets
Question details
The user needs to correct a COUNTIFS formula that is returning a count of 10 for cells that appear completely empty or cleared.

- Product
- WPS Spreadsheet / Excel
- Device & OS
- not provided
- Scenario
- Counting specific data based on multiple criteria, such as a date and a person's name, using the COUNTIFS function.
- Observed behavior
- The COUNTIFS formula incorrectly counts empty-looking cells as matching the criteria, resulting in an output of 10, whereas it evaluates other names and dates correctly.
Before proceeding, select the seemingly blank cells in your criteria range and check the formula bar at the top to see if they contain any hidden formulas, spaces, or unexpected text.
Identify and Remove Hidden Spaces or Empty Strings
Use text evaluation functions to reveal invisible characters or empty strings generated by other formulas, and clear them from your dataset.
Cells that appear blank often contain space characters (accidental keystrokes) or empty text strings ("") returned by other formulas. The COUNTIFS function treats these invisible values as text, causing unexpected counts when your criteria unintentionally match them.
Click an empty cell next to your suspected blank data and type the formula =LEN(A1) (replace A1 with the target cell). If the result is greater than 0, the cell contains hidden characters.
In another cell, type =ISBLANK(A1). If it returns FALSE, the cell is not actually empty.
Highlight the affected column, press Ctrl + H to open Find and Replace. Type a single space in the 'Find what' field, leave 'Replace with' completely empty, and click 'Replace All'.
If the cells contain formulas returning "", copy the entire range, right-click, and choose 'Paste Special' > 'Values'. Afterward, you can manually delete the contents of those specific cells to make them truly blank.

Fix Date Formatting and Hidden Time Components
Ensure that your date criteria strictly matches the format of your dataset without hidden text formatting or unexpected time values.
Easily Troubleshoot Formulas and Clean Data with WPS Spreadsheet
WPS Spreadsheet provides powerful data cleaning tools, formula auditing, and flawless compatibility with Excel functions like COUNTIFS to help you fix calculation errors instantly.
- 1. Open your file in WPS: Launch WPS Spreadsheet and open the workbook containing the problematic COUNTIFS formula.
- 2. Audit the formula: Navigate to the 'Formulas' tab and use the 'Evaluate Formula' feature to step through how COUNTIFS is calculating your ranges.
- 3. Clean your data: Go to the 'Data' tab and utilize the data formatting tools to clear hidden spaces, convert text to dates, and ensure your criteria match perfectly.

Frequently Asked Questions
Why does ISBLANK return FALSE for a cell that looks empty?
ISBLANK only returns TRUE if a cell is completely devoid of any content. If a cell contains a hidden space character, an invisible non-printing character, or an empty string ("") generated by another formula, ISBLANK will evaluate it as FALSE.
How can I count cells that are truly blank?
To count blank cells, use the COUNTBLANK function (e.g., =COUNTBLANK(A1:A10)). Unlike COUNTIFS, COUNTBLANK accurately counts both completely empty cells and cells that contain formulas returning empty text strings.
Can hidden rows affect my COUNTIFS results?
Yes. The COUNTIFS function processes all cells within the specified range, including those in hidden rows or columns. To ensure accuracy, right-click your row numbers and select 'Unhide' to verify the hidden data isn't triggering your criteria.
How do I remove non-printing characters causing formula errors?
You can use the CLEAN function combined with the TRIM function (e.g., =TRIM(CLEAN(A1))) in a helper column to strip out hidden non-printing characters and extra spaces from your dataset, then paste the cleaned values over the original range.




