COUNTIFS
Counts the rows that meet every condition.
- Add and count by condition
- Practised in 1 lesson
Worked example
D2=COUNTIFS(B2:B5,"Due",C2:C5,">80000")
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Van | Service | Km | Book first |
| 2 | V-1 | Due | 91,000 | 2 |
| 3 | V-2 | Fine | 120,000 | |
| 4 | V-3 | Due | 46,000 | |
| 5 | V-4 | Due | 83,000 |
Ranges and conditions come in pairs, and every pair must match.
How to write it
=COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], …)
criteria_range1- The first column to test.
criteria1- What that column must match.
criteria_range2, criteria2, …- More pairs. All must match.
Try COUNTIFS yourself
The tasks for this function are part of Pro, which isn’t on sale yet. The lesson and its worked example are open to everyone.
See the lessonWatch out for
- Every range must be the same size, or Excel returns #VALUE!.
- Pairs are joined with “and”. For “or”, add two COUNTIFS.