Skip to main content
Version: Streamsheets 3.0

COUNTIF

Returns the number of cells in a cell-range which meet a given criterion. To specify multiple criteria please use COUNTIFS.

Syntax

=COUNTIF(CellRange, Criterion)

Arguments

NameTypeDescription
CellRangeRangeThe range of cells to count.
CriterionStringThe criterion a cell has to fulfill in order to be counted.

Return

TypeDescription
NumberThe number of cells which meet criterion.

Examples

AB
1apples32
2oranges54
3peaches75
4apples86
FormulaResultComment
=COUNTIF(A1:A4, "apples")
2Counts all apples.
=COUNTIF(B1:B4, ">55")
2Counts all cells which values is greater than 55.