Excel SUMIFS function: sum with multiple conditions
SUMIFS adds up rows that meet every condition: city and manager, dates by month, a cross-tab report. Plus the argument-order trap versus SUMIF.
SUMIFS adds up numbers only in rows where every condition is met. “How much did Aziz sell in Tashkent?”, “What were Tashkent’s sales in January?”, “What is the total of Tashkent orders over 1 mln?” — two, three or more conditions in one formula.
It is the workhorse of finance and sales reports. SUMIFS works with a single condition too, so many professionals always write it instead of SUMIF — adding a condition later is then trivial.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Date | City | Manager | Amount | Question | Answer | |
| 2 | 03.01.2025 | Tashkent | Aziz | 1 250 000 | Aziz, Tashkent | 2 640 000 | |
| 3 | 10.01.2025 | Samarkand | Dilnoza | 640 000 | |||
| 4 | 18.01.2025 | Tashkent | Javohir | 2 100 000 | |||
| 5 | 27.01.2025 | Tashkent | Aziz | 910 000 | |||
| 6 | 04.02.2025 | Samarkand | Dilnoza | 1 730 000 | |||
| 7 | 11.02.2025 | Tashkent | Aziz | 480 000 | |||
| 8 | 18.02.2025 | Tashkent | Javohir | 1 500 000 | |||
| 9 |
Syntax
=СУММЕСЛИМН(sum_range; criteria_range1; criteria1; [criteria_range2; criteria2]; ...)
- sum_range — the numbers to add:
D2:D8. It comes first! - criteria_range1, criteria1 — the first pair:
B2:B8,"Tashkent". - criteria_range2, criteria2 … — more pairs, up to 127.
Compare with SUMIF:
- SUMIF:
=СУММЕСЛИ(B2:B8;"Tashkent";D2:D8)— the sum range is last and optional. - SUMIFS:
=СУММЕСЛИМН(D2:D8;B2:B8;"Tashkent")— the sum range is first and required.
Conditions use “and” logic, and all ranges must be the same size.
Step by step: entering SUMIFS
1
Select F2 for the result.
2
Формулы → Математические → pick SUMIFS.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Date | City | Manager | Amount | Question | Answer | |
| 2 | 03.01.2025 | Tashkent | Aziz | 1 250 000 | Aziz, Tashkent | ||
| 3 | 10.01.2025 | Samarkand | Dilnoza | 640 000 | |||
| 4 | |||||||
| 5 |
3
First Sum_range — D2:D8 (amounts). Then the pairs: Criteria_range1 — B2:B8, Criteria1 — "Tashkent"; Criteria_range2 — C2:C8, Criteria2 — "Aziz".
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Date | City | Manager | Amount | Question | Answer | |
| 2 | 03.01.2025 | Tashkent | Aziz | 1 250 000 | Aziz, Tashkent | ||
| 3 | 10.01.2025 | Samarkand | Dilnoza | 640 000 | |||
| 4 | |||||||
| 5 |
4
Click OK. The result is 2,640,000. The formula: =СУММЕСЛИМН(D2:D8;B2:B8;"Tashkent";C2:C8;"Aziz").
Example 1: by month, plus a numeric condition
Put the first day of the month in F1. The date column appears twice — “from” and “to”:
=СУММЕСЛИМН(D2:D8;B2:B8;"Tashkent";A2:A8;">="&F1;A2:A8;"<="&КОНМЕСЯЦА(F1;0))
You can also put a condition on the sum column itself — Tashkent orders of 1 mln or more:
=СУММЕСЛИМН(D2:D8;B2:B8;"Tashkent";D2:D8;">=1000000")
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Date | City | Manager | Amount | Month | 01.01.20251 | |
| 2 | 03.01.2025 | Tashkent | Aziz | 1 250 000 | Tashkent, month | 4 260 000 | |
| 3 | 10.01.2025 | Samarkand | Dilnoza | 640 000 | Tashkent, 1 mln+ | 4 850 000 | |
| 4 | 18.01.2025 | Tashkent | Javohir | 2 100 000 | |||
| 5 | 27.01.2025 | Tashkent | Aziz | 910 000 | |||
| 6 | 04.02.2025 | Samarkand | Dilnoza | 1 730 000 | |||
| 7 | 11.02.2025 | Tashkent | Aziz | 480 000 | |||
| 8 | 18.02.2025 | Tashkent | Javohir | 1 500 000 | |||
| 9 |
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Date | City | Manager | Amount | Function | Tashkent total | |
| 2 | 03.01.2025 | Tashkent | Aziz | 1 250 000 | SUMIF | 6 240 0001 | |
| 3 | 10.01.2025 | Samarkand | Dilnoza | 640 000 | SUMIFS | 6 240 0002 | |
| 4 | 18.01.2025 | Tashkent | Javohir | 2 100 000 | |||
| 5 | 27.01.2025 | Tashkent | Aziz | 910 000 | |||
| 6 | 04.02.2025 | Samarkand | Dilnoza | 1 730 000 | |||
| 7 | 11.02.2025 | Tashkent | Aziz | 480 000 | |||
| 8 | 18.02.2025 | Tashkent | Javohir | 1 500 000 | |||
| 9 |
Pro level: a cross-tab report and “or” with an array
- A manager × month table with one formula.
=СУММЕСЛИМН($C$2:$C$8;$A$2:$A$8;$D2;$B$2:$B$8;E$1).$D2— the manager always comes from column D,E$1— the month always comes from row 1. Write it in E2 and fill it across the table. It looks like a PivotTable, but the layout is fully under your control and updates by itself with new data. - “Or” with an array.
=СУММ(СУММЕСЛИМН(D2:D8;B2:B8;{"Tashkent";"Samarkand"}))— the total for two cities. - Conditions from cells. With city, manager and month in cells, one formula becomes an interactive report: the user only changes a cell.
- Empty condition = “all”. The
"*"criterion matches any text cell. To make an empty cell mean “all cities”:B2:B8,IF(F1="","*",F1).
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Manager | Month | Amount | Manager | January | February | |
| 2 | Aziz | January | 1 250 000 | Aziz | 2 160 000 | 480 000 | |
| 3 | Dilnoza | January | 640 000 | Dilnoza | 640 000 | 1 730 000 | |
| 4 | Javohir | January | 2 100 000 | Javohir | 2 100 000 | 1 500 000 | |
| 5 | Aziz | January | 910 000 | ||||
| 6 | Dilnoza | February | 1 730 000 | ||||
| 7 | Aziz | February | 480 000 | ||||
| 8 | Javohir | February | 1 500 000 | ||||
| 9 |
Try it in the simulator
Type =СУММЕСЛИМН(D2:D8;B2:B8;"Tashkent";C2:C8;"Aziz") in F2. Then in F3 calculate Dilnoza’s sales in Samarkand: =СУММЕСЛИМН(D2:D8;B2:B8;"Samarkand";C2:C8;"Dilnoza").
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Date | City | Manager | Amount | Question | Answer | ||||||||||||||||||
| 2 | 45660 | Tashkent | Aziz | 1250000 | Aziz, Tashkent | |||||||||||||||||||
| 3 | 45667 | Samarkand | Dilnoza | 640000 | Dilnoza, Samarkand | |||||||||||||||||||
| 4 | 45675 | Tashkent | Javohir | 2100000 | ||||||||||||||||||||
| 5 | 45684 | Tashkent | Aziz | 910000 | ||||||||||||||||||||
| 6 | 45692 | Samarkand | Dilnoza | 1730000 | ||||||||||||||||||||
| 7 | 45699 | Tashkent | Aziz | 480000 | ||||||||||||||||||||
| 8 | 45706 | Tashkent | Javohir | 1500000 | ||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 | ||||||||||||||||||||||||
| 11 | ||||||||||||||||||||||||
| 12 |
Has ExcelLab been useful?
Support the project and help us release new lessons and exercises.