COUNTIF for text matching

Beginner

When you need a quick breakdown of how many items fall into each category, COUNTIF is the right tool. It counts how many cells in a range match a condition you specify.

In this exercise, you have a helpdesk log with 9 tickets in rows 2 through 10. Each ticket has a status: "Open", "Closed", or "Pending". Your job is to fill in the summary table (rows 13 to 15) that counts how many tickets have each status.

How COUNTIF works:

=COUNTIF(range, criteria)

  • range: the column of cells to search through
  • criteria: the value to match (text must be in quotes, or you can reference a cell)

COUNTIF matches text exactly, but it is not case-sensitive, so "open" and "Open" count the same.

What you need to do:

  1. Click cell B13 (next to "Open").
  2. Write a COUNTIF formula that searches the Status column (C2:C10) and counts how many cells match the label in A13.
  3. Press Enter, then copy the formula down to B14 and B15.

When you're done, the summary table should show the correct count for each status.

Need some help?

Hint 1

Make sure your range points to the Status column (column C), not the Ticket # or Subject columns. COUNTIF returns 0 if the range doesn't include the values you're trying to match.

Hint 2

Lock the range with dollar signs ($C$2:$C$10) so it stays fixed when you copy the formula down. When all three rows are filled in, the counts should add up to 9: the total number of tickets.

Related function(s)