The COUNTIF function

Counts the cells in a range that meet one condition. Text conditions ignore upper and lower case.

Syntax

COUNTIF(range, criteria)
range
The cells to count.
criteria
The condition, such as "North", ">=300", "*shoe*" or a cell.

Examples

E1=COUNTIF(A2:A6,"North")
ABCDE
1RegionProductSales3
2NorthShoes500
3SouthShoes300
4NorthBags250
5NorthShoes420
6SouthBags180

In plain words: Count the cells in A2:A6 that say North.

E1=COUNTIF(C2:C6,">=300")
ABCDE
1RegionProductSales3
2NorthShoes500
3SouthShoes300
4NorthBags250
5NorthShoes420
6SouthBags180

Practice COUNTIF

Read the guide

Questions

How do I count cells that contain a word?

Use wildcards: =COUNTIF(A2:A6,"*north*") counts cells with "north" anywhere in them.

Related functions