COUNTIF practice exercises (with answers)
Twelve COUNTIF and COUNTIFS problems on a ticket log—status counts, wildcards, and multi-criteria—plus links into live drills.
Put the ticket log in A1:C11 (headers in row 1). Write answers in column E. Live drills: COUNTIF, COUNTIFS, wildcards, COUNT practice. Guides: COUNTIF, COUNTIFS.
The practice table
| Ticket | Status | Team |
|---|---|---|
| T1 | Open | Support |
| T2 | Closed | Support |
| T3 | Open | Sales |
| T4 | Pending | Support |
| T5 | Open | Sales |
| T6 | Closed | Sales |
| T7 | Open | Support |
| T8 | Pending | Sales |
| T9 | Closed | Support |
| T10 | Open | Support |
Refresher
=COUNTIF(range, criteria)
=COUNTIFS(range1, criteria1, range2, criteria2)
Criteria for text need quotes. Wildcards: * any run of characters, ? one character.
Exercise 1 — open tickets
Count Open in Status.
Answer: =COUNTIF($B$2:$B$11, "Open") → 5
Exercise 2 — support team
Count rows where Team is Support.
Answer: =COUNTIF($C$2:$C$11, "Support") → 6
Exercise 3 — open + support
Count tickets that are Open and Support.
Answer: =COUNTIFS($B$2:$B$11, "Open", $C$2:$C$11, "Support") → 3
Exercise 4 — not closed
Count Status not equal to Closed.
Answer: =COUNTIF($B$2:$B$11, "<>Closed") → 7
Exercise 5 — criteria from a cell
Put Pending in G1. Count that status with a cell reference.
Answer: =COUNTIF($B$2:$B$11, G1) → 2
Exercise 6 — wildcard start
Count tickets whose ID starts with T1 (T1 and T10).
Answer: =COUNTIF($A$2:$A$11, "T1*") → 2
Exercise 7 — sales closed
Count Closed tickets on Sales.
Answer: =COUNTIFS($B$2:$B$11, "Closed", $C$2:$C$11, "Sales") → 1
Exercise 8 — blank trap
Insert a blank Status in B12 and extend the range to row 12. =COUNTIF($B$2:$B$12, "") counts blanks—do not confuse with "<>" alone.
Answer: blank criteria is ""; “anything not blank” is "<>".
Exercise 9 — case
Does =COUNTIF($B$2:$B$11, "open") match Open?
Answer: yes — COUNTIF text match is case-insensitive in Excel.
Exercise 10 — interview
When do you use COUNTIFS instead of two COUNTIFs added together?
Answer: when both criteria must be true on the same row. Adding two COUNTIFs double-counts rows that match only one criterion.
Exercise 11 — SUMIF cousin
Estimate Open Support ticket load if each Open Support ticket is worth 1 hour: use COUNTIFS, then compare to SUMIF practice.
Answer: =COUNTIFS($B$2:$B$11, "Open", $C$2:$C$11, "Support") → 3 hours in this toy set.
Exercise 12 — live check
Open COUNTIF practice and COUNTIFS, then return to the practice hub.