Example 1
Any mix of conditions
Pick a region, a product, or both. “Any” puts * in the condition cell, which matches any text.
4 rows pass both conditions, every East sale: $16,550. The * lets any text through.
C11=SUMIFS(C2:C9,A2:A9,A11,B2:B9,B11)
Adds up the numbers that meet every condition you set. One condition or a dozen, it's the same function.
Quick answer
=SUMIFS(what to add, where to check, what to match, …)
Put the column to add first, then pairs of a range and a condition. A row only counts if every condition is true.
Step 1 · Watch
Total East's revenue in C11.
C11=SUMIFS(C2:C9,A2:A9,A11)
SUMIFS added every row where the region is East: four sales. Your turn next.
Steps 2 and 3 · Your turn
Task 1 of 2
In C12, total East's laptop revenue. That's two conditions.
Answer in C12.
Then the conditions, two arguments at a time. Hover, focus or press an argument to see what it points at.
C12=SUMIFS(C2:C9,A2:A9,A12,B2:B9,B12)
Each argument has its own colour, the way Excel colours references while you edit. Rows that pass every condition are added up in C12.
Change the inputs and watch the formula and the sheet respond.
Example 1
Pick a region, a product, or both. “Any” puts * in the condition cell, which matches any text.
4 rows pass both conditions, every East sale: $16,550. The * lets any text through.
C11=SUMIFS(C2:C9,A2:A9,A11,B2:B9,B11)
Example 2
Use the same column twice: once for the lower limit, once for the upper. Join each operator to its cell with &.
3 sales are between $3,000 and $6,000, adding up to $13,400. One column, two conditions.
C11=SUMIFS(C2:C9,C2:C9,">="&A11,C2:C9,"<="&B11)
Example 3
* stands for any run of characters, ? for exactly one, and <> means “not”.
* stands for any characters, so this matches everything that starts with “Laptop”. 2 rows, $11,800.
B9=SUMIFS(B2:B7,A2:A7,A9)
They look alike, but the arguments come in a different order. Add a second condition and see which one copes.
SUMIF
E1=SUMIF(A2:A9,"East",C2:C9)
$16,550 · all of East
SUMIFS
E1=SUMIFS(C2:C9,A2:A9,"East")
$16,550 · all of East
SUMIF(range, criteria, [sum_range]) · SUMIFS(sum_range, criteria_range1, criteria1, …)
Your manager asks for East’s laptops only.
| SUMIF | SUMIFS | |
|---|---|---|
| Conditions | One | Up to 127 |
| Where the range to add goes | Last, and optional | First, and required |
| How conditions combine | Only one condition | All must be true |
| “This or that” | Add two SUMIFs | Add two SUMIFS, or wrap an array of values in SUM |
| Wildcards and comparisons | Yes | Yes |
| Works in Excel 2007 and later | Yes | Yes |
SUMIFS rarely shows an error. More often it quietly returns the wrong total, usually 0. Fix each formula yourself, or press “Show me”.
The range to add runs to row 6 but the region range stops at row 5. Every range in SUMIFS must be the same size.
Shows #VALUE!.
“Laptops” is a product, but this checks it against the Region column, so nothing matches. Point the condition at the Product column.
Shows $0.
Inside quotes, A8 is just the letters “A8”, so no amount matches. Keep the operator in quotes and join the cell with &.
Shows $0.
Add a pair of arguments for each condition: range, then criteria. A row is added only when all conditions are met, for example `=SUMIFS(D2:D9, B2:B9, "North", C2:C9, "Widgets")`.
Use two conditions on the date column: `=SUMIFS(D2:D9, A2:A9, ">="&F2, A2:A9, "<"&G2)`. F2 is the first day and G2 is the day after the last.
Nothing met all of the conditions. Check for extra spaces or numbers stored as text, and look for a quoted cell reference such as `">=F2"`. Try each condition alone to find the one that fails.
Not directly, since conditions are joined with AND. Wrap an array of values in SUM: `=SUM(SUMIFS(D2:D9, B2:B9, {"North","East"}))`, or add two SUMIFS.
SUMIFS is easier to read and faster on big tables. SUMPRODUCT is needed when a condition is calculated, such as testing the month of a date, because SUMIFS criteria must point at cell values.
Yes, as long as every range has the same number of rows. Write the sheet name in each reference, for example `Data!D2:D9`.
Solve it in the sheet. Every answer is checked, with hints if you need them.
Task 1 of 3
In H2, total the revenue for the region in F2 and the channel in G2.
Answer in H2.
D2:D9 with B2:B8, SUMIFS returns #VALUE!. Make every range start and end on the same rows.">="&F2 written ">=F2", compares against the text "F2" and returns 0. Close the quote and join the cell with &.#VALUE!.$D$2:$D$9.SUMIFS is taught in Data analysis with formulas, lesson 1: SUMIFS: totals by group. Each lesson is a short, graded exercise like the one above.