Syntax
Criteria can be a number, a piece of text, a comparison like ">=50", or a wildcard pattern using * (any number of characters) or ? (a single character) for partial text matches. Text comparisons in COUNTIF aren't case-sensitive, so "yes" and "Yes" count the same cells.
Examples
Counts how many cells in A2:A100 contain the text "Yes".
Counts how many values in the range are 50 or greater.
Counts cells that contain "Error" anywhere in the text, using wildcards on both sides.
Paste your own COUNTIF formula and get a plain-English explanation, or describe what you need and let FormulaFixer write it for you.
Explain a COUNTIF formula →More formulas