Function Problems

Use COUNTIFS in Excel to Count Survey Results by Multiple Criteria

Maira MehtabMaira Mehtab Nov 18, 2026 870 views

Question details

Count survey rows that match several criteria without nesting XLOOKUP functions.

Use COUNTIFS in Excel to Count Survey Results by Multiple Criteria
Product
Microsoft Excel
Device & OS
not provided
Scenario
A survey worksheet contains group, location, and question values that must all match specified criteria.
Observed behavior
The desired result is a count of rows where all three criteria match.
Before you start

Identify the columns containing the survey group, location, and question, along with the cells holding the criteria. Make sure all criteria ranges cover the same number of rows.

Solution 1Recommended

Count Matching Survey Rows with COUNTIFS in Excel

Use one criteria range and criterion pair for each condition that a survey row must meet.

COUNTIFS counts rows only when all specified conditions are met. It returns a count rather than a value from a matching row.

1
Check the example ranges

In the worksheet, use O2:O7 for groups, P2:P7 for locations, and Q2:Q7 for questions. Use C2, E2, and F2 for the corresponding criteria, or adjust the references to match your sheet.

2
Enter the formula

Select the cell where you want the count and enter =COUNTIFS($O$2:$O$7,C2,$P$2:$P$7,E2,$Q$2:$Q$7,F2), then press Enter.

3
Copy the formula if needed

Drag the fill handle down to count matches for criteria in other rows. The dollar signs keep the survey ranges fixed while the criteria references change.

Count Matching Survey Rows with COUNTIFS in Excel
Check unexpected counts: If the result is not as expected, check that the criteria values match the survey data and that the ranges include all relevant rows.
Count survey results in WPS

Use COUNTIFS for Survey Counts in WPS Spreadsheets

Open your survey workbook in WPS Spreadsheets and use COUNTIFS to count rows that match the group, location, and question criteria.

  1. 1. Open the workbook: In WPS Spreadsheets, choose Open and select your survey workbook.
  2. 2. Identify the criteria: Check the group, location, and question columns and the cells containing the values you want to match.
  3. 3. Enter COUNTIFS: Select a result cell and enter =COUNTIFS($O$2:$O$7,C2,$P$2:$P$7,E2,$Q$2:$Q$7,F2), adjusting the references to your worksheet, then press Enter.
  4. 4. Apply the formula to other rows: Drag the result cell's fill handle down if you have additional criteria rows to count.
Count survey rows against multiple criteria in one formulaOpen and edit Microsoft Excel XLSX workbooksCopy the formula down for other criteria rowsUse a familiar spreadsheet interface
QA img-9

Frequently Asked Questions

How does COUNTIFS combine multiple conditions?

COUNTIFS counts a row only when every specified condition matches. Add each condition as a criteria range followed by its criterion in the formula.

Why does my COUNTIFS formula return an error?

Check that every criteria range covers the same number of rows and columns. For example, O2:O7, P2:P7, and Q2:Q7 are all six rows tall.

Can COUNTIFS return a survey answer instead of a count?

No. COUNTIFS returns the number of matching rows. To return a value from a matching row, use a lookup formula such as XLOOKUP instead.

Why are there dollar signs in the criteria ranges?

The dollar signs in references such as $O$2:$O$7 keep the survey range fixed when you drag the formula to another row. References such as C2 change as the formula is copied.