SheetsLessons
Lesson 11 · Conditional Math

COUNTIF Function

Practice COUNTIF in Google Sheets: count matching text, numbers above a threshold, and wildcard patterns.

Task 1 of 3

How many orders came from the West region? Answer in E2.

E2
fx

Tip: while typing a formula, click a cell or drag across cells to insert references. Press Enter to check, and Tab to accept a function suggestion.

Counting cells that match a condition

=COUNTIF(range, criterion)

COUNTIF looks through a range and counts the cells that meet your criterion. The criterion is flexible:

CriterionCounts cells that…
"West"equal West (not case-sensitive)
">500"are greater than 500
"<>Done"are anything except Done
"*@gmail.com"end with @gmail.com (* = any characters)
"?????"are exactly five characters (? = one character)
E2equal whatever is in cell E2

Comparison criteria go inside the quotes: ">500", not >"500". To compare against a cell, join them: ">"&E2.