Why COUNTIF Returns Different Results Across WPS Spreadsheet Sheets
Question details
Understand why COUNTIF formulas return different counts on two sheets and make their ranges comparable.

- Product
- WPS Spreadsheets
- Device & OS
- not provided
- Scenario
- The user is comparing counts of values across sheets that may cover different years.
- Observed behavior
- One sheet returns a count of 28 and the other returns 29; the second sheet includes an additional year.
Open the workbook and identify the cells containing the COUNTIF formulas on both sheets. Note the year labels beside each range so you can compare the same period.
Compare COUNTIF Ranges and Underlying Values
Use this approach when two sheets return different counts for what should be the same period.
Select the COUNTIF result cell on each sheet and check its range and criterion in the formula bar.
Check the year labels beside both ranges. For example, 1991–2019 includes one more year than 1992–2019.
Edit each formula in the formula bar so its range covers the same years and number of cells. Use the appropriate row addresses for each sheet.
Review the cells in the selected ranges for zeros, blanks, text values, and hidden spaces. Correct unintended differences, then compare the results again.
Count Cells That Are Not Equal to Zero
Use this formula when the intended criterion is simply that a cell is not equal to zero.
Compare COUNTIF Results in WPS Spreadsheets
Open your workbook in WPS Spreadsheets, inspect the ranges and criteria on each sheet, and adjust them to cover the same years.
- 1. Open the workbook: In WPS Spreadsheets, open the workbook containing the sheets you want to compare.
- 2. Inspect the first formula: Click the first sheet tab, select its COUNTIF result cell, and read the range and criterion in the formula bar.
- 3. Compare the second sheet: Click the second sheet tab and inspect its COUNTIF formula and corresponding year labels.
- 4. Align and check the ranges: Edit the formulas so they cover the same years, then review any differing cells for zeros, text, blanks, or spaces.

Frequently Asked Questions
Why does one sheet return 29 when the other returns 28?
Check the year labels beside each COUNTIF range. If one range includes an additional year with a qualifying value, the one-count difference may be correct.
How do I count cells that are not equal to zero?
Enter =COUNTIF($N$14:$N$63,"<>0") in a result cell, replacing the range with the cells you need to check. Review text and blank cells if the count is unexpected.
Does the criterion "<>0" also exclude the value 2?
No. It excludes values equal to zero, but 2 still meets that criterion. Use an additional condition if your count must exclude both values.
Why should I check for text and hidden spaces?
Text values and spaces can affect whether a cell meets a COUNTIF criterion. Select suspicious cells and inspect their contents in the formula bar.




