COUNTIF in Google Sheets
Counts the cells in a range that meet one condition. Text conditions ignore upper and lower case.
In Google Sheets
COUNTIF takes the same two arguments in Google Sheets and understands the same operators and wildcards.
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 |