Free SUMIF practice

SUMIF practice exercises

SUMIF adds up values that meet a single condition; note that the sum range comes last. 5 reps, from easy to hard, each checked in a real spreadsheet engine. 2 free, 3 with Pro.

=SUMIF(range, criteria, [sum_range])
Skill: SUMIF Change skill (45)

SUMIF guide

How to use SUMIF in Excel

SUMIF adds up values that meet a single condition: the sales for one region, or every order over 200. It's the older, one-condition version of SUMIFS, and many existing workbooks and tests still use it.

Watch the argument order: in SUMIF the range to add comes last, after the condition. In SUMIFS it comes first.

Syntax

=SUMIF(range, criteria, [sum_range])
ArgumentWhat it is
rangeThe cells to check against the condition, such as A2:A7.
criteriaWhat they must match: text in quotes, a cell, or a comparison such as ">=200".
sum_rangeOptional. The numbers to add. Leave it out to add the checked cells themselves.

Examples

Example 1 Total sales for one region. Check the regions in column A and add the matching sales in column D.
F2fx=SUMIF(A2:A7,"North",D2:D7)
ABCDEF
1RegionProductUnitsSalesNorth sales
2NorthWidget4200625
3SouthGadget2150
4NorthGadget5375
5EastWidget3150
6NorthWidget150
7SouthWidget6300

=SUMIF(A2:A7,"North",D2:D7) returns 625.

Example 2 Add the cells you check. Without sum_range, SUMIF adds the cells that meet the condition: every sale of 200 or more.
F2fx=SUMIF(D2:D7,">=200")
ABCDEF
1RegionProductUnitsSalesBig sales
2NorthWidget4200875
3SouthGadget2150
4NorthGadget5375
5EastWidget3150
6NorthWidget150
7SouthWidget6300

=SUMIF(D2:D7,">=200") returns 875.

Example 3 Condition from a cell. Total Widget sales, with the product typed in F2.
G2fx=SUMIF(B2:B7,F2,D2:D7)
ABCDEFG
1RegionProductUnitsSalesProductSales
2NorthWidget4200Widget700
3SouthGadget2150
4NorthGadget5375
5EastWidget3150
6NorthWidget150
7SouthWidget6300

=SUMIF(B2:B7,F2,D2:D7) returns 700.

Common mistakes

Using the SUMIFS order

In SUMIF the range to add comes last. Putting it first checks the sales for the word North, finds nothing, and returns 0.

Wrong=SUMIF(D2:D7,"North",A2:A7) → 0

Right=SUMIF(A2:A7,"North",D2:D7) → 625

Leaving out sum_range on text

Without sum_range, SUMIF adds the checked cells. These are region names, so the total is 0.

Wrong=SUMIF(A2:A7,"North") → 0

Right=SUMIF(A2:A7,"North",D2:D7) → 625

SUMIF questions

Should I use SUMIF or SUMIFS?

SUMIFS. It handles one condition or many, and its argument order stays the same as you add conditions. Learn SUMIF so you can read existing workbooks.

Can SUMIF use wildcards?

Yes: "*Widget*" matches text that contains Widget, and "W*" matches text that starts with W.

How do I sum with two conditions?

SUMIF only takes one. Use SUMIFS: =SUMIFS(D2:D7,A2:A7,"North",B2:B7,"Widget").

Related functions

Reading is the warm-up

The reps are what make it stick. Try SUMIF in the practice sheet above.

Practise SUMIF ↑