COUNTIF & SUMIF practice exercises

COUNTIF counts the cells that match a condition, and SUMIF adds the numbers next to them. They are the quickest way to summarize a list without building a pivot table.

Syntax

COUNTIF(range, criterion)   ·   SUMIF(range, criterion, [sum_range])
range
The cells to test.
criterion
A value like "West" or a comparison like ">6".
sum_range
SUMIF only: the numbers to add for each matching row.

The practice data

An orders table: who sold what, where, and for how much. Every exercise below uses this sheet, and your answer goes in H2.

ABCDEF
1RepRegionProductUnitsPriceSales
2AnaEastWidget12560
3BenWestGadget520100
4CaraEastGadget820160
5DevNorthWidget205100
6AnaWestGizmo350150
7BenEastWidget7535
8CaraNorthGizmo250100
9DevEastGadget620120

Worked example

=COUNTIF(B2:B9,"East")

Counts how many orders came from the East region. Result:

4

Your turn: 3 exercises

Type a formula and press Enter. It is checked by a real formula engine, so any correct approach counts.

1 How many orders did Cara make?

H2

2 How many orders had more than 6 units?

H2

3 Return the total Sales for the West region using SUMIF.

H2

Master COUNTIF & SUMIF in the full course

Lesson 5 of 18 goes deeper, with more exercises in a real spreadsheet grid. Start with the first 4 lessons free, then unlock everything with Pro.

Start free See pricing

Common COUNTIF & SUMIF mistakes

FAQ

How do I count with more than one condition?

Use COUNTIFS (and SUMIFS for totals). See the SUMIFS exercises.

Can I use wildcards?

Yes: "G*" matches anything starting with G, and "?" matches one character.

Keep practicing