Count the cells in a range that meet a single condition.
Syntax
COUNTIF(range, criteria)Arguments
rangerequired
The cells to count.
criteriarequired
The condition, e.g. ">0" or "Done".
COUNTIF counts how many cells match one criterion — useful for tallies, finding duplicates, and quick quality checks. For multiple conditions, use COUNTIFS.
=COUNTIF(B2:B100, "Done")→34Counts how many tasks are marked Done.
=COUNTIF(A2:A100, A2)>1→TRUEFlags duplicates: TRUE when a value appears more than once.
Select the range
Choose the column or block of cells to scan.
Write the criteria
Match exact text, a number, or an operator like ">=10".
Use =COUNTIF(range, cell)>1 as a helper column or conditional-formatting rule — it's TRUE for any value that repeats.