COUNTIFS in Google Sheets
Counts the rows that meet every one of several conditions. Use the same range twice to count between two limits.
In Google Sheets
COUNTIFS takes the same pairs of range and criterion in Google Sheets, and every range must be the same size.
Syntax
COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2], ...)- criteria_range1
- The cells the first condition is checked against.
- criteria1
- The first condition.
- criteria_range2, criteria2 (optional)
- More range and condition pairs, up to 127.
Examples
E1
=COUNTIFS(1A2:A6,2"North",3B2:B6,4"Shoes")| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Product | Sales | 2 | |
| 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 rows where 1the region in A2:A6 is 2North and 3the product in B2:B6 is 4Shoes.
E1=COUNTIFS(C2:C6,">=200",C2:C6,"<=400")
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Product | Sales | 2 | |
| 2 | North | Shoes | 500 | ||
| 3 | South | Shoes | 300 | ||
| 4 | North | Bags | 250 | ||
| 5 | North | Shoes | 420 | ||
| 6 | South | Bags | 180 |