Function reference · Math & aggregation

COUNTIF

Counts how many cells in a range meet a condition.

COUNTIF(range, criterion)

COUNTIF answers "how many?" — how many orders from this region, how many entries over budget, how many times a name appears. Counting duplicates is its most common job.

Arguments

ArgumentRequiredWhat it does
range Yes The cells to test.
criterion Yes A value, or a comparison in quotes such as ">1000".

Worked example

RegionRepSales
WestAna1200
EastBen900
WestCara1500
NorthDan600
EastEve1100
=COUNTIF(A2:A6, "West")

Returns 2.

Two rows have West as their region.

Gotchas

Related functions