Fix COUNTIFS #VALUE! Error with Multi-Column Criteria Ranges
Question details
The user needs to resolve a #VALUE! error that occurs when using the COUNTIFS function with criteria ranges of different dimensions (e.g., one range spanning two columns and another spanning one column).

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Calculating conditional counts across multiple criteria where one condition applies to a multi-column range while another applies to a single-column range.
- Observed behavior
- The COUNTIFS formula returns a #VALUE! error because the function strictly requires all criteria ranges to have an identical number of rows and columns.
Verify the exact ranges in your formula to confirm if they have a different number of columns or rows, as COUNTIFS strictly requires symmetrically sized criteria ranges to function properly.
Use the SUMPRODUCT Function
The most robust way to evaluate mismatched column arrays without repeating long formulas is to use SUMPRODUCT with boolean logic.
SUMPRODUCT can handle array calculations inherently. By multiplying the boolean arrays (TRUE/FALSE) of your conditions, you can bypass the strict dimension requirements of COUNTIFS.
Click on the cell where you want the final calculation result to appear.
Type a formula structured like =SUMPRODUCT((B6:C33="Apple")*(D6:D33="US")).
Replace B6:C33 with your actual multi-column range, D6:D33 with your single-column range, and adjust the target criteria ("Apple", "US") to match your specific conditions. Press Enter to calculate.

Combine Multiple COUNTIFS Formulas
If you prefer sticking to COUNTIFS, you can split the multi-column range into single columns and add the results of separate formulas.
Effortlessly Fix Formula Errors with WPS Spreadsheet
WPS Spreadsheet offers full support for advanced array functions like SUMPRODUCT and COUNTIFS. It provides intuitive error tracing tools to help you identify dimension mismatches instantly, making complex data analysis a breeze.
- 1. Download and Install: Download WPS Office from the official website and install it on your computer.
- 2. Open your worksheet: Launch WPS Spreadsheet and open the file containing your problematic COUNTIFS formula.
- 3. Apply the solution: Replace the faulty COUNTIFS with the SUMPRODUCT method or the additive COUNTIFS approach.
- 4. Use Error Checking: Navigate to the Formulas tab and use the 'Error Checking' tool if you need further help tracing formula faults.

Frequently Asked Questions
Why does COUNTIFS require identical range sizes?
The COUNTIFS function is designed to check corresponding cells across multiple ranges simultaneously. If the ranges have different numbers of rows or columns, the function cannot align the cells 1-to-1, resulting in a #VALUE! error.
Can I use COUNTIF instead of COUNTIFS for multi-column ranges?
You can use COUNTIF (without the 'S') to count a single condition across a multi-column range (e.g., =COUNTIF(A1:C10, "Apple")). However, if you need to evaluate multiple criteria simultaneously across different ranges, you must use COUNTIFS or SUMPRODUCT.
Will the SUMPRODUCT solution slow down my workbook?
SUMPRODUCT is an array function and can be resource-intensive if applied to entire columns (e.g., A:A). To maintain workbook performance, always restrict the ranges in your SUMPRODUCT formula to the exact rows containing your data (e.g., A1:A1000).




