Excel SUMIFS examples: multiple criteria, date ranges, and what to do when it isn't working
Two conditions, three conditions, an amount between two limits. On a charity shop's real sheet you'll see how SUMIFS combines them, and why an OR doesn't simply fit inside it.
Christophe, founder of Lurndo
· 8 min read
SUMIFS adds up the numbers from the rows that meet all your conditions. The sum range comes first, followed by a range and its criteria each time, as in =SUMIFS(C2:C16,B2:B16,"Clothing",E2:E16,"Sophie"). You can use up to 127 pairs, including two on one column for a date range. Every condition has to hold: for one thing or another, add two formulas together.

What does SUMIFS do in Excel?
SUMIFS adds up the numbers from the rows that meet all your conditions. Where SUMIF asks one question, SUMIFS asks as many as you like: is it clothing, and did Sophie sell it? =SUMIFS(C2:C16,B2:B16,"Clothing",E2:E16,"Sophie") only adds up the prices where both hold. In a Dutch copy of Excel, the same function is called SOMMEN.ALS.
Every example works on the same sheet: a week of sales at the Second Chance charity shop in Gloucester, the fourth client in our Excel course. If you'd rather learn the function step by step, follow the lesson on multiple conditions. If SUMIF is new to you, start there, because the criteria work exactly the same way. This article is the reference for the step to more than one condition.
How do you write a SUMIFS formula?
First comes what you're adding up, then the conditions follow in pairs. The first pair is required, the others are optional, and you can use up to 127 (Microsoft).
=SUMIFS(sum_range,criteria_range1,criteria1,[criteria_range2,criteria2],…)| Argument | What it is | Required? |
|---|---|---|
| sum_range | The cells you add up, such as the prices in C2:C16 | Yes |
| criteria_range1 | The cells where you test the first condition | Yes |
| criteria1 | The first condition: text, a number, ">5" or a cell | Yes |
| criteria_range2, criteria2 | Another range with its condition, and so on | No |
With Dutch or Belgian regional settings you'd write =SOMMEN.ALS(C2:C16;B2:B16;"Clothing";E2:E16;"Sophie"), with semicolons instead of commas. If you copy a formula from a site in another language, translate both the function name and the separators. On the course pages you choose which form you see.
How do you sum with two conditions?
Coordinator Yasmina at Second Chance wants to know how much clothing Sophie sold. This is the whole sheet, with all fifteen sales of the week. G2 holds a price limit of £10, which we'll refer to in a moment.
| Row | A: Item | B: Category | C: Price (£) | D: Day | E: Volunteer |
|---|---|---|---|---|---|
| 2 | Dress green | Clothing | 12 | Mon | Sophie |
| 3 | Book fiction | Books | 2 | Mon | Omar |
| 4 | Lamp | Household | 8 | Tue | Sophie |
| 5 | T-shirt S | Clothing | 3 | Tue | Grace |
| 6 | Dressing gown | Clothing | 6 | Wed | Omar |
| 7 | Puzzle | Toys | 4 | Wed | Grace |
| 8 | Book cooking | Books | 3 | Thu | Sophie |
| 9 | Radio | Electrical | 15 | Thu | Omar |
| 10 | T-shirt XL | Clothing | 4 | Fri | Sophie |
| 11 | Dress black | Clothing | 18 | Fri | Grace |
| 12 | What? Game | Toys | 5 | Sat | Omar |
| 13 | Vase | Household | 7 | Sat | Grace |
| 14 | T-shirt M | Clothing | 3 | Sat | Sophie |
| 15 | Bookend | Household | 9 | Sat | Omar |
| 16 | Kids' bike | Toys | 35 | Sat | Grace |
=SUMIFS(C2:C16,B2:B16,"Clothing",E2:E16,"Sophie")The formula returns £19. Excel looks at each row and tests both conditions on that row. Clothing appears six times, but only Dress green, T-shirt XL and T-shirt M are also Sophie's: 12 + 4 + 3 = 19. Sophie's lamp drops out on its category, the black dress on its volunteer. A row only counts when every condition holds.
Try it yourself. The exercise runs on Second Chance's real sheet, and you type the formula as you would in Excel, with commas or semicolons.
Try it: household items on Saturday
What did household items bring in on Saturday? Work it out in I2 with SUMIFS.
| A | B | C | D | E | F | G | H | I | J | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Item | Category | Price | Day | Volunteer | Limit | ||||
| 2 | Dress green | Clothing | £12.00 | Mon | Sophie | £10.00 | ||||
| 3 | Book fiction | Books | £2.00 | Mon | Omar | |||||
| 4 | Lamp | Household | £8.00 | Tue | Sophie | |||||
| 5 | T-shirt S | Clothing | £3.00 | Tue | Grace | |||||
| 6 | Dressing gown | Clothing | £6.00 | Wed | Omar | |||||
| 7 | Puzzle | Toys | £4.00 | Wed | Grace | |||||
| 8 | Book cooking | Books | £3.00 | Thu | Sophie | |||||
| 9 | Radio | Electrical | £15.00 | Thu | Omar | |||||
| 10 | T-shirt XL | Clothing | £4.00 | Fri | Sophie | |||||
| 11 | Dress black | Clothing | £18.00 | Fri | Grace | |||||
| 12 | What? Game | Toys | £5.00 | Sat | Omar | |||||
| 13 | Vase | Household | £7.00 | Sat | Grace | |||||
| 14 | T-shirt M | Clothing | £3.00 | Sat | Sophie | |||||
| 15 | Bookend | Household | £9.00 | Sat | Omar | |||||
| 16 | Kids' bike | Toys | £35.00 | Sat | Grace | |||||
| 17 |
Your formula ran in your own browser, on a real calculation engine. We check the result, not the letters: then we run your formula again on a hidden version of the sheet, with other prices and days. Anyone who types 16 gets caught there.
How do you use greater than and a cell in SUMIFS?
The same way as in SUMIF: the operator goes in quotation marks, and you join a cell on with &. Criteria can take any form you know from the lesson on criteria, and you can mix them. The range you test can even be the sum range itself, so you test on the price and add up that same price.
| Question | Formula | Result |
|---|---|---|
| Clothing over £5 | =SUMIFS(C2:C16,B2:B16,"Clothing",C2:C16,">5") | £36 |
| Clothing above the limit in G2 | =SUMIFS(C2:C16,B2:B16,"Clothing",C2:C16,">"&G2) | £30 |
| Everything but clothing on Saturday | =SUMIFS(C2:C16,B2:B16,"<>Clothing",D2:D16,"Sat") | £56 |
| Dresses and gowns Grace sold | =SUMIFS(C2:C16,A2:A16,"Dress*",E2:E16,"Grace") | £18 |
| Sophie's clothing over £3 | =SUMIFS(C2:C16,B2:B16,"Clothing",E2:E16,"Sophie",C2:C16,">3") | £16 |
Wildcards work too: ? stands for one character, * for a run of characters, and a ~ in front turns them back into a plain question mark or asterisk (Microsoft). When you refer to a cell, the formula follows as soon as someone changes the limit. Try that below. The hidden version of the sheet has a different limit, so a typed 10 stands out.
Try it: clothing above the limit
What did the clothing priced above the limit in G2 bring in? Work it out in I2, with a reference to G2.
| A | B | C | D | E | F | G | H | I | J | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Item | Category | Price | Day | Volunteer | Limit | ||||
| 2 | Dress green | Clothing | £12.00 | Mon | Sophie | £10.00 | ||||
| 3 | Book fiction | Books | £2.00 | Mon | Omar | |||||
| 4 | Lamp | Household | £8.00 | Tue | Sophie | |||||
| 5 | T-shirt S | Clothing | £3.00 | Tue | Grace | |||||
| 6 | Dressing gown | Clothing | £6.00 | Wed | Omar | |||||
| 7 | Puzzle | Toys | £4.00 | Wed | Grace | |||||
| 8 | Book cooking | Books | £3.00 | Thu | Sophie | |||||
| 9 | Radio | Electrical | £15.00 | Thu | Omar | |||||
| 10 | T-shirt XL | Clothing | £4.00 | Fri | Sophie | |||||
| 11 | Dress black | Clothing | £18.00 | Fri | Grace | |||||
| 12 | What? Game | Toys | £5.00 | Sat | Omar | |||||
| 13 | Vase | Household | £7.00 | Sat | Grace | |||||
| 14 | T-shirt M | Clothing | £3.00 | Sat | Sophie | |||||
| 15 | Bookend | Household | £9.00 | Sat | Omar | |||||
| 16 | Kids' bike | Toys | £35.00 | Sat | Grace | |||||
| 17 |
How do you sum between two values or two dates?
Use the same range twice, with a lower limit and an upper limit. =SUMIFS(C2:C16,C2:C16,">=5",C2:C16,"<=10") adds up the prices from £5 to £10 inclusive: £35, for the lamp, the gown, the game, the vase and the bookend. That only works in SUMIFS, because SUMIF has a single criteria.
A date range works the same way, because a date is a number to Excel. Second Chance writes the day as text, but with a real date in column D you'd write this for all of November:
=SUMIFS(C2:C16,D2:D16,">="&DATE(2026,11,1),D2:D16,"<"&DATE(2026,12,1))Test for less than 1 December rather than less than or equal to 30 November. That way, a sale on 30 November at 3 pm still counts, because it falls just after the date of 30 November. If the start and end dates are in cells, it becomes ">="&H1 and "<"&H2+1, with H1 and H2 as an example. Yasmina can then pick the period herself without touching the formula.
Can SUMIFS work with OR?
Not with ordinary criteria: all the conditions in one SUMIFS must hold at the same time. That's why =SUMIFS(C2:C16,B2:B16,"Clothing",B2:B16,"Books") returns £0. No single cell is clothing and books at once. It's the most common wrong assumption about this function, and it gives no error message, just a zero.
For one thing or another, add two formulas together. =SUMIFS(C2:C16,B2:B16,"Clothing")+SUMIFS(C2:C16,B2:B16,"Books") returns £51: £46 for the clothing and £5 for the books. That's correct because a row has only one category. Ask for clothing or Sophie's sales, though, and one row can meet both. Sophie's £19 of clothing then counts twice, so you subtract it again.
Why isn't my SUMIFS working?
SUMIFS is stricter than SUMIF, which is lucky: you see some of the mistakes straight away. The rest give a believable wrong amount or a silent zero. These are the causes you'll run into most, each with its fix.
The formula returns #VALUE!
Usually the ranges aren't the same size. Criteria ranges and the sum range must refer to the same number of rows and columns, or SUMIFS returns #VALUE! (Microsoft). =SUMIFS(C2:C16,B2:B16,"Clothing",E2:E15,"Sophie") stops there, because E2:E15 is a row short. SUMIF is more forgiving (Microsoft), which makes a shifted range harder to spot.
The sum range is at the end
In SUMIF the sum range is the third argument, in SUMIFS the first, and Microsoft points this out itself (Microsoft). Anyone who writes =SUMIFS(B2:B16,"Clothing",C2:C16) gives the function criteria without a range of their own, and Excel won't accept that.
When you turn a SUMIF into a SUMIFS to add a condition, move the sum range to the front first, and only then add the new pair.
The result is 0
First check whether you're asking for two conditions on one column that can't hold together, as above. Then look for text without quotation marks, which Microsoft names as the first cause of an unexpected 0 (Microsoft). Spaces in the cells and ">G2" instead of ">"&G2 also give a zero. They're all worked through in the SUMIF troubleshooting section.
Which functions are like SUMIFS?
SUMIFS has two close relatives, and all three read their pairs the same way. Once you know one, you can write the others without much thought.
| Function | What it does | Example | Result |
|---|---|---|---|
| SUMIFS | Adds up with multiple conditions | =SUMIFS(C2:C16,B2:B16,"Clothing",E2:E16,"Sophie") | £19 |
| COUNTIFS | Counts rows with multiple conditions | =COUNTIFS(B2:B16,"Clothing",E2:E16,"Sophie") | 3 items |
| AVERAGEIFS | Averages with multiple conditions | =AVERAGEIFS(C2:C16,B2:B16,"Clothing",E2:E16,"Sophie") | £6.33 |
If you want to count rather than add up, read COUNTIFS with examples. Averages with conditions are covered in AVERAGEIF and AVERAGEIFS. For the formulas you'll need most often, see the 12 most useful Excel formulas, and every function with its Dutch and English name is on the Excel cheat sheet.
If you want SUMIFS at your fingertips, follow module 4 of the Excel course. It's six short lessons on Second Chance's sheet, from COUNTIF to AVERAGEIF, and the first modules are free.
Frequently asked questions
What's the difference between SUMIF and SUMIFS?
SUMIF adds up with one condition, SUMIFS with one or more, up to 127 pairs of a range and its criteria. The order differs too. SUMIF has the sum range last, SUMIFS has it first. SUMIFS also insists that all its ranges are the same size, while SUMIF doesn't check that.
Can SUMIFS use OR instead of AND?
Not in one formula with ordinary criteria. Every condition in SUMIFS has to hold. If you want clothing or books, add two formulas together, one per category. If a row could meet both conditions, subtract the overlap again, or that row counts twice in your total.
How do you use SUMIFS between two dates?
Use two conditions on the same date column: from the first date, and before the day after the last. For example, =SUMIFS(C2:C16,D2:D16,">="&DATE(2026,11,1),D2:D16,"<"&DATE(2026,12,1)) covers all of November. A time on the last day still counts, and nobody has to guess the date format.
Why does SUMIFS return
Usually because the ranges aren't the same size. Every criteria range needs as many rows and columns as the sum range. If one says E2:E15 while the rest run to row 16, the formula returns
How many criteria can SUMIFS handle?
Up to 127 pairs of a range and its criteria, according to Microsoft. In practice you'll rarely need more than three or four. If you do use more, put the criteria in their own cells and refer to them. The formula stays readable, and you can change a limit without opening it.
Practise this in the course
Every lesson explains first and then lets you practise yourself, with a real spreadsheet in your browser.
- SUMIFSCounting and adding with conditions · Several conditions
- SUMIFCounting and adding with conditions · Adding up what matches
- CriteriaCounting and adding with conditions · Criteria with operators
Sources
- Microsoft Support, SUMIFS function
- Microsoft Support, How to correct a
- Microsoft Support, SUMIF function
Christophe, founder of Lurndo
Christophe builds Lurndo from Belgium, with short, playful exercises for SQL, Excel, HTML & CSS and touch typing that show straight away what your answer does. On this blog, Christophe answers the questions people run into while learning, with sources you can check yourself.
Read next
AVERAGEIF and AVERAGEIFS examples: one condition or several, and why you get #DIV/0!Two functions with nearly the same name and their arguments in a different order. On a charity shop's real sheet you'll see when to use which, and where an average can lead you astray.Excel · · 7 min read
Excel COUNTIFS examples: counting with multiple criteria, including between two valuesHow many items over £5 did Grace sell? On a charity shop's real sheet you'll see how COUNTIFS counts row by row, and you can write one yourself right away.Excel · · 7 min read