The COUNTIFS function

Counts the rows that meet every one of several conditions. Use the same range twice to count between two limits.

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(A2:A6,"North",B2:B6,"Shoes")
ABCDE
1RegionProductSales2
2NorthShoes500
3SouthShoes300
4NorthBags250
5NorthShoes420
6SouthBags180

In plain words: Count the rows where the region in A2:A6 is North and the product in B2:B6 is Shoes.

E1=COUNTIFS(C2:C6,">=200",C2:C6,"<=400")
ABCDE
1RegionProductSales2
2NorthShoes500
3SouthShoes300
4NorthBags250
5NorthShoes420
6SouthBags180

Practice COUNTIFS

Read the guide

Related functions