COUNTIF in Google Sheets
COUNTIF counts the cells in a range that meet one condition. Match text exactly with =COUNTIF(B2:B20, "Paid"), or use a comparison in quotes: =COUNTIF(C2:C20, ">100").
To compare with a cell instead of a fixed number, join the operator and the reference with &: =COUNTIF(C2:C20, ">"&F1). Wildcards help with partial matches: "*north*" matches any text containing "north". COUNTIF is not case-sensitive.
Syntax
=COUNTIF(range, criterion)
Example
=COUNTIF(B2:B20, "Paid")
How many invoices are marked Paid.
Common mistakes
- Leaving the operator outside the quotes:
>"100". - Writing
">F1", which compares with the text "F1". - Trailing spaces in the data that stop exact matches.
← IFS for many outcomes · SUMIF → · All lessons