Excel Tip - COUNTIF Function with Wildcards

Let’s say you have a list of products and you want to know how many entries there are of a certain product...
Using the COUNTIF function will automatically calculate the answer for you:

=COUNTIF(Range of cells that have products in, “product name”)

i.e. =COUNTIF(A2:A9,”White Chocolate”)

But what if you wanted to count products that had "Chocolate" in the name along with other text? E.g. White Chocolate, Chocolate Chip Cookies, Dutch Chocolate etc..
The COUNTIF function’s power can be extended with Wildcards. Namely the asterisk *.

=COUNTIF(A2:A9,”*chocolate*”)

 

countif

Pin it