COUNTIF Function: syntax, examples, mistakes and translation notes
Counts cells matching one condition.
Syntax
=COUNTIF(range, criteria)
Arguments
range
Cells to test.
criteria
Condition that determines which cells are counted.
Worked examples
=COUNTIF(C:C,"Complete")
Counts cells in C equal to Complete.
=COUNTIF(B2:B100,">=70")
Counts values at least 70.
Practical tips
- Use wildcard characters only when pattern matching is intentional.
- Join comparison operators to cell references with &, such as ">="&E2.
- Use COUNTIFS for more than one condition.
Common mistakes
- Putting the criteria range and criteria in the wrong order.
- Expecting COUNTIF to apply multiple independent conditions.
Related functions
Frequently asked questions
What does COUNTIF do?
Counts cells matching one condition.
Why might a COUNTIF formula return an unexpected result?
Putting the criteria range and criteria in the wrong order. Start by testing the smallest referenced range or condition independently before adding wrappers or fallbacks.
Check the complete formula
Function syntax is only one part of a working workbook. Paste the finished expression into the Formula Checker for structural warnings, the Formatter for readability or the Translator when a supported locale mapping is involved.
Testing note: examples are educational. Spreadsheet versions, locale settings, tables, named ranges and workbook data can change behavior, so validate important formulas with representative data.