Google Sheets function

COUNTIF function in Google Sheets

COUNTIF in Google Sheets counts cells in one range that match a single criterion. The criterion can check text, a number, a comparison such as greater than, or a pattern with wildcards. Use COUNTIF to count statuses, thresholds, names, or other repeated conditions.

Source: Google Docs Editors HelpLast verified Nov 5, 2026

Syntax

=COUNTIF(range, criterion)

Arguments

ArgumentRequiredWhat it means
rangeYesThe range tested against the criterion.
criterionYesThe pattern or test applied to each cell in the range.

Examples

Count completed tasks

AB
1TaskStatus
2DraftDone
3ReviewWaiting
4PublishDone
=COUNTIF(B2:B4,"Done")

Result: 2

Two cells in the status range exactly match Done.

Common mistakes

Leaving a text criterion outside quotation marks.

Write text criteria as strings, such as "Done".

Trying to test several criteria with COUNTIF.

COUNTIF handles one criterion. Use COUNTIFS for multiple criteria.