Function Problems

How to Use COUNTIFS in WPS Office Excel to Match All Listed Criteria

John WilsonJohn Wilson Nov 13, 2026 868 views

Question details

The user wants to count records that match a group and include each of two specified conditions in Excel using COUNTIFS, rather than counting rows that meet only one condition.

How to Use COUNTIFS in WPS Office Excel to Match All Listed Criteria
Product
WPS Office Excel
Device & OS
not provided
Scenario
A user has a dataset with a group column and a criteria column, and needs a formula to count rows belonging to a specific group that also have either of two listed values.
Observed behavior
A standard COUNTIFS formula cannot return the combined total for two values in the same column because its conditions are evaluated as AND.
Before you start

Open your WPS Office Excel workbook and verify the exact ranges for the group column and the criteria column. Check that criteria values such as "Cold" and "Room Temp" match the cell text exactly, including spaces and capitalization.

Solution 1Recommended

Use SUM with COUNTIFS and an Array of Criteria

Best when you need a formula that returns the combined total for a group plus either of the listed criteria.

COUNTIFS normally evaluates all conditions as AND, so it cannot match two different values in the same column directly. Wrapping COUNTIFS in SUM with an array constant calculates separate counts for each listed value and adds them together.

1
Select a blank result cell

Click an empty cell where you want the total count to appear.

2
Enter the SUM and COUNTIFS array formula

Type =SUM(COUNTIFS(C2:C26,"Group",B2:B26,{"Cold","Room Temp"})) in the formula bar or selected cell.

3
Confirm the formula

Press Enter, or press Ctrl+Shift+Enter if your WPS Office version requires legacy array formula entry.

4
Verify the total

Compare the result against separate COUNTIFS totals for "Cold" and "Room Temp" to confirm both values are included.

Use SUM with COUNTIFS and an Array of Criteria
Formula result: The formula returns the combined count for both listed criteria under the specified group.
WPS Office Excel

Count Multi-Criteria Matches in WPS Office Excel with SUM and COUNTIFS

WPS Office Excel supports the same COUNTIFS, SUM, and array constant technique to count rows that match a group and any of the listed criteria. Open your .xlsx workbook and enter the formula directly in WPS Office.

  1. 1. Open your workbook: Open the target workbook in WPS Office Excel.
  2. 2. Select a result cell: Click an empty cell where the result should be displayed.
  3. 3. Enter the formula: Type =SUM(COUNTIFS(C2:C26,"Group",B2:B26,{"Cold","Room Temp"})).
  4. 4. Confirm the calculation: Press Enter, or Ctrl+Shift+Enter for legacy array entry.
  5. 5. Review the total: Check the returned total to confirm it includes both listed criteria.
Uses native Excel functions so existing .xlsx workbooks and formulas remain compatible.Free, lightweight WPS Office Excel alternative with a familiar ribbon and formula engine.COUNTIFS and pivot table tools handle multi-criteria summaries without extra add-ins.Preserves Microsoft Office format compatibility for seamless sharing and collaboration.
microsoft office alternative - wps office

Frequently Asked Questions

Why does COUNTIFS with two criteria in the same column return 0?

COUNTIFS evaluates conditions as AND, so one cell cannot equal both "Cold" and "Room Temp". Use =SUM(COUNTIFS(C2:C26,"Group",B2:B26,{"Cold","Room Temp"})) to sum separate COUNTIFS results for each value.

Can I use this formula in WPS Office Excel and Microsoft Excel?

Yes. WPS Office Excel supports COUNTIFS, SUM, and array constants in .xlsx workbooks, so the same formula works in both applications.

How can I use cell references instead of typing the criteria in the formula?

You can place "Cold" and "Room Temp" in cells and use a formula such as =SUMPRODUCT(COUNTIFS(C2:C26,"Group",B2:B26,D2:D3)), replacing D2:D3 with your criteria cells.

When should I use a pivot table instead of a formula?

Use a pivot table when you want an interactive summary. Select the data, go to Insert > PivotTable, and drag the group and temperature fields to Filters, Rows, and Values.