# 21. Excel How to count cells with a specific text ?

To count the cells with a specific text, use the function COUNTIF.

The function COUNTIF returns the number of occurrences of the value given in the 2^{nd} argument in the range of cells given in the 1^{st} argument.

Here is a concrete example:

In cell B3, the formula is :

=COUNTIF(C7:C26,"Successful")

This formula counts the number of occurrences of the value "Successful" in the cell range C7:C26.