Skip to main content

COUNTIF function

The COUNTIF function is one of the statistical functions. It is used to count the number of the selected cells based on the specified criterion.

Syntax​

COUNTIF(range, criteria)

The COUNTIF function has the following arguments:

ArgumentDescription
rangeThe selected range of cells you wish to count applying the specified criterion.
criteriaA criterion you wish to apply.

Notes​

The criteria argument can include the wildcard characters — the question mark (?) that matches a single character and the asterisk (*) that matches multiple characters. If you want to find a question mark or asterisk, type a tilde (~) before the character.

How to apply the COUNTIF function.

Examples​

The figure below displays the result returned by the COUNTIF function.

COUNTIF Function