Skip to main content
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
Show menu Show menu

COUNTIF function


COUNTIF(operator, value, range) counts the values in range that satisfy a comparison condition.

Each number in range is compared with value, and if the comparison is true, the number is counted.

The comparison operator can be any of the following:

=Equal to
<Less than
>Larger than
<=Less then or equal to
>=Larger then or equal to
<>Different from

The argument range can be a list of numbers, cell addresses, cell ranges (such as A1:A10).

Range can also be a matrix. In that case the function returns a matrix with one row and the same number of columns, with each element the COUNTIF of the corresponding column. If range is a row matrix, it is converted to a column matrix first.


COUNTIF("<",10,A1:A5) count all cells in range A1:A5 that have a value less then 10.


COUNTIF(  ,  ,  

Related functions