WPS Spreadsheets: Fix COUNTIFS Criteria Ranges with Different Sizes
Question details
The user needs to understand whether COUNTIFS criteria ranges must have matching dimensions and how to correct a formula that uses ranges of different lengths.
- Product
- WPS Spreadsheets
- Device & OS
- not provided
- Scenario
- A COUNTIFS formula compares a text lookup value against ranges such as A:A43 and C2:C51.
- Observed behavior
- The formula does not return the expected count because its criteria ranges start or end on different rows.
Check the first and last row of every range referenced by COUNTIFS, and confirm whether you want one row-by-row multi-condition count or separate counts from independent ranges.
Make all COUNTIFS criteria ranges the same size
Use this solution when multiple conditions must be evaluated for corresponding rows in the same dataset.
COUNTIFS evaluates criteria ranges row by row, so every criteria range must have the same number of rows and matching start and end positions. Ranges such as A2:A43 and C2:C51 cannot be paired in one COUNTIFS formula.
In WPS Spreadsheets, click the cell containing the COUNTIFS formula and review each range in the formula bar.
Edit the formula so every criteria range starts and ends on the same rows, such as A2:A51 and C2:C51, or A2:A43 and C2:C43.
Press Enter to recalculate the formula, then verify that the criteria and lookup value refer to the intended cells.
Use separate COUNTIF formulas for independent ranges
Use this option when the two ranges should be counted independently rather than matched by row.
Resolve COUNTIFS Range Mismatches in WPS Spreadsheets
WPS Spreadsheets lets you edit COUNTIFS formulas directly in the formula bar, align criteria ranges, and use separate COUNTIF functions when independent counting is required. Its familiar spreadsheet interface supports smooth migration from Excel files.
- 1. Open your spreadsheet: Launch WPS Office, open the workbook, and select the worksheet containing the COUNTIFS formula.
- 2. Inspect the formula: Click the result cell and review the criteria ranges shown in the formula bar.
- 3. Align or separate the ranges: Make all COUNTIFS ranges the same size, or replace the formula with separate COUNTIF functions when the ranges are independent.
- 4. Recalculate and verify: Press Enter, review the returned count, and save the corrected workbook.

Frequently Asked Questions
Do all COUNTIFS criteria ranges need the same number of rows?
Yes. Every criteria range in COUNTIFS must have matching dimensions, including the same number of rows and aligned starting and ending rows.
Can I use A:A43 and C2:C51 in the same COUNTIFS formula?
No. These ranges have different lengths and start on different rows. Change them to matching ranges, such as A2:A51 and C2:C51, if they represent the same records.
How can I count matches in two unrelated ranges?
Use separate COUNTIF functions and add their results, for example =COUNTIF(A2:A43,A79)+COUNTIF(C2:C51,A79).
Why does COUNTIFS return an unexpected result for a text lookup value?
The text value may not match the cell contents exactly, or the criteria ranges may have mismatched dimensions. First align the ranges, then check for extra spaces or inconsistent text.
Does WPS Spreadsheets support COUNTIFS formulas from Excel?
Yes. WPS Spreadsheets supports COUNTIFS and COUNTIF formulas and can open compatible Excel XLSX and XLS workbooks.




