Excel functions / Maths & statistics

COUNTIF

Counts the cells that meet one condition.

Syntax=COUNTIF(range, criteria)

Arguments

rangeThe cells to check.
criteriaThe condition, such as "Yes", ">=50" or "*tea".

How it works

COUNTIF answers "how many?" questions: how many orders from the East, how many scores of 50 or more, how many cells say Yes.

Text conditions are not case-sensitive, and you can use wildcards for partial matches.

Example

E2=COUNTIF(A2:A5,"West")
ABCDE
1RegionRepSales
2EastAna5002
3WestBen300
4EastCal250
5WestDee700
6

Result: 2. Two rows are in the West.

Tips

Practise COUNTIF

Try it yourself in a real spreadsheet, with instant feedback on every answer.

Start the exercise

Related