Arguments
range- The range of cells to count.criteria- The condition, e.g. ">100", "Yes", or "*text*".
Counts the cells in a range that meet a single condition.
Syntax
=COUNTIF(range, criteria)range - The range of cells to count.criteria - The condition, e.g. ">100", "Yes", or "*text*".=COUNTIF(A2:A100, "Complete")Returns: Number of cells equal to "Complete"
Counts exact text matches.
=COUNTIF(A2:A100, "*error*")Returns: Cells containing "error" anywhere
Wildcards (*) match partial text.
Yes. COUNTIF uses the same syntax in Google Sheets and LibreOffice Calc, so you can paste these formulas straight across.
Fill in your ranges and copy a ready-to-paste formula - no signup.