Count cells containing text

Intermediate

In many workplace scenarios, you need to count cells that contain a specific word or phrase, even when it appears as part of longer text.

The COUNTIF function can do this using wildcards. The asterisk (*) is a wildcard that matches any sequence of characters. By placing asterisks before and after your search term, you can find cells that contain that term anywhere in the text.

How it works:

=COUNTIF(range, "*searchterm*")

The asterisks act as placeholders for any text that might come before or after your search term. This pattern is case-insensitive, so "urgent", "URGENT", and "Urgent" all match.

Your task:

You're managing a task list and need to quickly identify how many tasks are marked as urgent. The team uses the word "urgent" in their notes, but they write it in different ways (uppercase, lowercase, or as part of a sentence).

In cell B13, write a COUNTIF formula that counts how many cells in the Notes column contain the word "urgent" anywhere in the text.

Need some help?

Hint 1

Use COUNTIF with the Notes column range (D2:D11) as the first argument.

Hint 2

Wrap your search term in asterisks to match partial text: "*urgent*" - the asterisks match any characters before or after the word.

Related function(s)

Exercise