Practice by topic / Excel / Counting & Averaging

COUNTIF Wildcards & Operators Exercises

COUNTIF criteria do more than exact matches: "*blue*" counts cells that contain a word, "SG-*" cells that start with it, ">100" numbers above a limit, "<>Closed" everything except one value and "<>" every filled cell. Joining an operator to a cell, as in ">="&D1, keeps the limit editable. These 10 exercises build up step by step, starting with count names that contain a word, count codes that start with a prefix, count orders over 100.

3 of 10 free · no sign-up needed · graded on the formula you write

1

Count Names That Contain a Word

Free

A2:A7 hold product names. Write a formula in C1 that counts how many contain the word "blue" anywhere in the name.

ABC
1Product?
2Blue mug
3Red mug
4Blue plate
5Green mug
6Blue bowl
7Light blue cup
Show the solution

Use =COUNTIF(A2:A7,"*blue*")

Right — asterisks on both sides mean 'anything before, anything after', and COUNTIF ignores capital letters.

Expected result in C1: 4

Try it in the live spreadsheet →
2

Count Codes That Start With a Prefix

Free

A2:A6 hold order codes. Write a formula in C1 that counts the codes that start with "SG-".

ABC
1Order code?
2SG-101
3MY-204
4SG-330
5TH-412
6ID-118
Show the solution

Use =COUNTIF(A2:A6,"SG-*")

Good — an asterisk only at the end means 'starts with'.

Expected result in C1: 2

Try it in the live spreadsheet →
3

Count Orders Over 100

Free

A2:A6 hold order values. Write a formula in C1 that counts orders greater than 100.

ABC
1Order value?
2120
385
4240
560
6310
Show the solution

Use =COUNTIF(A2:A6,">100")

Right — comparison operators go inside the quotes with the number.

Expected result in C1: 3

Try it in the live spreadsheet →
4

Use a Threshold From Another Cell

A2:A6 hold scores and D1 holds the pass mark. Write a formula in D2 that counts scores at or above the pass mark, so it updates if D1 changes.

ABCD
1ScorePass mark75
272?
345
488
591
660

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →
5

Count Everything Except One Status

A2:A6 hold ticket statuses. Write a formula in C1 that counts the tickets whose status is not "Closed".

ABC
1Status?
2Open
3Closed
4Pending
5Closed
6Open

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →
6

Count Filled-In Cells With COUNTIF

A2:A6 is a sign-up list with a blank row. Write a formula in C1 that uses COUNTIF to count the cells that are not blank.

ABC
1Sign-ups?
2Ali
3
4Mei
5Raj
6Siti

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →
8

Count Five-Character Codes With ?

A2:A6 hold product codes. Write a formula in C1 that counts the codes that are exactly 5 characters long, using the ? wildcard.

ABC
1Code?
2AB123
3AB12
4CD456
5EF7890
6GH001

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →
9

Count Answers in Any Capitalisation

A2:A6 hold survey answers typed in different capitalisations. Write a formula in C1 that counts every "yes" answer.

ABC
1Answer?
2yes
3Yes
4NO
5YES
6no

Solution and instant grading: open it in the practice app (use one of your 20 free picks, or Pro).

Try it in the live spreadsheet →