Statistical Modern

COUNTIF

Counts the cells in a range that meet a single condition.

Available in All versions

Syntax

COUNTIF(range, criteria)

What it returns

The number of cells that match the criteria.

Arguments

ArgumentRequiredDescription
range Yes The cells to test.
criteria Yes The condition that decides which cells to count (e.g. ">100", "Paris").

Example

Criteria
City = "Paris"
AB
1CityAmount
2Paris120
3Lyon80
4Paris200
5Nice150
Count
2

Count how many rows have City = Paris (2).

=COUNTIF(A2:A100, "Paris")

Important to know

One condition only — for several, use COUNTIFS.

Text criteria are not case-sensitive.

Related functions

Related learning