Matheasy
COUNTIF()
Returns a conditional count across a range.
Syntax
fx
=COUNTIF(range, criterion)
Try it
F2
→
8
Sample data · sales.csv
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Company | Region | Quarter | Revenue |
| 2 | Acme Co | West | Q1 | 18,400 |
| 3 | Acme Co | West | Q2 | 22,100 |
| 4 | Acme Co | West | Q3 | 31,700 |
| 5 | Acme Co | West | Q4 | 48,200 |
| 6 | Globex | East | Q1 | 14,200 |
| 7 | Globex | East | Q2 | 19,800 |
| 8 | Globex | East | Q3 | 23,400 |
Common pitfalls
- Criteria like
">100"must be quoted as a string, including the comparison operator. COUNTIFis single-criterion only. For multiple conditions reach forCOUNTIFS.- Empty cells and
""are NOT the same.COUNTIF(A:A, "")only counts truly empty cells.
Related formulas
Used by