The COUNTIF function
Counts the cells in a range that meet one condition. Text conditions ignore upper and lower case.
Syntax
COUNTIF(range, criteria)- range
- The cells to count.
- criteria
- The condition, such as "North", ">=300", "*shoe*" or a cell.
Examples
E1
=COUNTIF(1A2:A6,2"North")| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Product | Sales | 3 | |
| 2 | North | Shoes | 500 | ||
| 3 | South | Shoes | 300 | ||
| 4 | North | Bags | 250 | ||
| 5 | North | Shoes | 420 | ||
| 6 | South | Bags | 180 |
In plain words: Count the cells 1in A2:A6 that say 2North.
E1=COUNTIF(C2:C6,">=300")
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Product | Sales | 3 | |
| 2 | North | Shoes | 500 | ||
| 3 | South | Shoes | 300 | ||
| 4 | North | Bags | 250 | ||
| 5 | North | Shoes | 420 | ||
| 6 | South | Bags | 180 |
Practice COUNTIF
Read the guide
Questions
How do I count cells that contain a word?
Use wildcards: =COUNTIF(A2:A6,"*north*") counts cells with "north" anywhere in them.