What you will learn
- Count rows that match more than one condition
How it works
COUNTIFS(range1, what1, range2, what2). A row is counted only if it matches every pair.
Formulas at a glance
=COUNTIFS(B2:B9,6,C2:C9,"Art") | grade 6 AND Art |
Example
Write the formula to count 6th graders in the Art club.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Student | Grade | Club | ||
| 2 | Ana | 6 | Art | Grade 6 Art | |
| 3 | Ben | 7 | Chess | Grade 7 Chess | |
| 4 | Cleo | 6 | Music | ||
| 5 | Dev | 7 | Art | Grade 6 Chess | |
| 6 | Eli | 6 | Art | Grade 7 Music | |
| 7 | Fay | 7 | Chess | ||
| 8 | Gus | 6 | Chess |
Click F2 and type =COUNTIFS(B2:B9,6,C2:C9,"Art"), then press Enter.
The answer is 2.
When to use it
- How many 6th graders are in the Art club
- How many East orders were shipped
- Any count with an AND between the conditions
Common mistakes
- Ranges of different sizesEvery range must cover the same rows, like B2:B9 and C2:C9.
- Expecting ORCOUNTIFS means AND. For OR, add two COUNTIFS together.
- Mixing up the order in a pairRange first, then what to look for.
Practice it on a real sheet
Reading is a start. Doing it is how it sticks. This lesson walks you through every click on a live spreadsheet and checks each answer.