Google Sheets COUNTIFS function
Counts the rows that meet several conditions at once.
Syntax
=COUNTIFS(criteria_range1, criterion1, [criteria_range2, criterion2, ...])
criteria_range1 | The first range to test. |
|---|---|
criterion1 | The condition for the first range. |
criteria_range2, criterion2, ... | Optional. More range/condition pairs. |
Try it
Edit the formula and the result updates instantly. Click a cell to add its reference.
Q1 sales
Result: 3
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Rep | Region | Product | Units | Revenue |
| 2 | Ana | East | Pens | 120 | 240 |
| 3 | Ben | West | Paper | 80 | 400 |
| 4 | Cara | East | Paper | 45 | 225 |
| 5 | Dev | North | Pens | 200 | 400 |
| 6 | Ana | East | Ink | 30 | 450 |
| 7 | Ben | West | Pens | 95 | 190 |
| 8 | Cara | East | Ink | 12 | 180 |
| 9 | Dev | North | Paper | 60 | 300 |
Examples
These use the sample sheet above.
→ 3
East sales worth more than $200.
→ 3
Use the same range twice for "between".
Tips & common mistakes
- All the ranges must be the same size, or you'll get an error.