Counting by Criteria With COUNTIF
Count cells that satisfy one condition using COUNTIF.
From Adding to Counting
SUMIF totals matching numbers. Sometimes you do not care about the total, you just want to know how many rows match a condition. How many sales were in the East region? How many scores were above 90?
That is the job of COUNTIF. It scans a range and counts every cell that satisfies your condition, ignoring the rest.
The COUNTIF Pattern
COUNTIF is simpler than SUMIF because it only needs two pieces:
- range the cells to look through
- criteria the condition each cell is tested against
There is no separate sum_range, because COUNTIF counts the matching cells in the same range it tests.
=COUNTIF(range, criteria)All lessons in this course
- Summing by Criteria With SUMIF
- Counting by Criteria With COUNTIF
- Averaging by Criteria With AVERAGEIF
- Using Wildcards in Criteria