If no cells meet criteria, COUNTIF returns zero.

The asterisk (*) is awildcardfor one or more characters.

Byconcatenatingasterisks before and after the value in D5, the formula will count the value as a substring.

Excel formula: Value exists in a range

In other words, it will count the value if it appears anywhere inside any cell in the range.

Any positive result means the value was found.

With IF

You cannestthis formula inside theIF functionas the logical test.

Excel formula: Range contains one of many values

COUNTIF can be used to count…

Excel formula: Range contains one of many substrings

Excel formula: Cell contains specific text

Excel formula: Cell contains one of many things

Excel formula: Range contains specific date

Excel COUNTIF function