COUNTIF Function in Excel

What is the COUNTIF Function?

The COUNTIF() function is used to count the number of cells that meet a specific condition within a given range. This function is very useful when analyzing data, such as counting sales above a certain value or counting entries that match specific text.

Syntax

=COUNTIF(range, criteria)

Examples

Count the number of values in column C greater than 70:

=COUNTIF(C3:C9,">70")

Count the number of cells containing the text "Store A":

=COUNTIF(C3:C9,"Store A")
How to use the COUNTIF function in Excel to count values greater than 70
Using the formula =COUNTIF(C3:C9,">70") in Excel.
COUNTIF Excel result showing the number of values greater than 70
Result of the COUNTIF function.
COUNTIF formula example in Excel using text criteria Store A
Using =COUNTIF(C3:C9,"Store A") in Excel.
COUNTIF Excel result counting Store A data
COUNTIF result for text-based criteria.