SUMIFS
SOMMEN.ALS in Dutch Excel
Adds the numbers in one range for the rows where every condition you set on other ranges is met.
Last updated: 13 October 2026
| Row | A | B | C | D | E | F |
|---|---|---|---|---|---|---|
| 1 | Entry no. | Account | Debit | Account | 45004500 | |
| 2 | 25-0101 | 45004500 | €4,200.00€ 4.200,00 | Ledger total | €6,445.00€ 6.445,00=SUMIFS(C2:C7, B2:B7, F1)=SUMIFS(C2:C7; B2:B7; F1) | |
| 3 | 25-0114 | 40004000 | €18,650.00€ 18.650,00 | |||
| 4 | 25-0207 | 45004500 | €860.00€ 860,00 | |||
| 5 | 25-0233 | 46004600 | €540.00€ 540,00 | |||
| 6 | 25-0251 | 45004500 | €1,385.00€ 1.385,00 | |||
| 7 | 25-0260 | 40004000 | €19,120.00€ 19.120,00 |
Swipe sideways to see all columns
Result: €6,445.00€ 6.445,00
=SUMIFS(C2:C7,B2:B7, F1)
=SUMIFS(C2:C7;B2:B7; F1)
What SUMIFS does and when to use it
What it does: it adds the numbers in one column, but only for the rows that meet all your criteria, for example the debit total of account 4500.
When to use it: for any total that depends on conditions, such as a region, a month or an account. It replaces SUMIF, which takes one condition, and most SUMPRODUCT formulas written for several.
Two main gains:
- More than one condition: up to 127 pairs of range and criterion in one formula, instead of adding SUMIFs together.
- A date window in one formula: test the same range twice, once with ">=" and once with "<=".
How Excel evaluates it
Excel first checks that every criteria range has the same shape as sum_range; if not, it stops with #VALUE!. It then walks the rows by position. For each row it tests the cell in criteria_range1 against criteria1, then the cell in criteria_range2 against criteria2, and so on. A row is added only if every test passes; one failed test drops the row.
A criterion written as text with an operator, such as ">=46082", is split into the operator and the value before the comparison, which is why dates work as criteria once they are joined as numbers.
Watch out: SUMIFS joins all conditions with AND, so a row must pass every one of them. For 'North or East' you need two SUMIFS added together, or SUMPRODUCT.
Mental model
A row of gates in a corridor. Each row of data walks through; every gate checks one thing, and only rows that get through all the gates drop their amount in the box at the end.
SUMIFS(sum_range,criteria_range1, criteria1, [criteria_range2, criteria2], ...)
SUMIFS(sum_range;criteria_range1; criteria1; [criteria_range2; criteria2]; ...)
| Argument | Type | Meaning |
|---|---|---|
sum_range | Required | The cells whose numbers are added when a row passes every test. |
criteria_range1 | Required | The range the first condition is tested on; same size as sum_range. |
criteria1 | Required | The test: a value, a cell, or text such as ">=100" or "MEM-*". |
criteria_range2 | Optional | Range for a further condition; pairs repeat up to 127 times. |
criteria2 | Optional | The test for criteria_range2, written like criteria1. |
Return value:A number: the total of sum_range cells that meet every criterion
Formulas use commas (,) between arguments, as in English Excel. Formulas use semicolons (;) between arguments, as in Dutch Excel. Formulas use commas (,) between arguments, as in English Excel; Dutch Excel uses semicolons (;).
Worked examples
Beginner
Ledger total for one account
You have the journal lines of Veldhuis Installatie BV from the XAF auditfile. The trial balance says account 4500 (Huisvestingskosten) has a debit total for the year, and you want to recalculate it from the lines. Type the account number in F1 and the total appears.
| Row | A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|---|
| 1 | Entry no. | Account | Debit | Account | 45004500 | ||
| 2 | 25-0101 | 45004500 | €4,200.00€ 4.200,00 | Ledger total | €6,445.00€ 6.445,00=SUMIFS(C2:C7, B2:B7, F1)=SUMIFS(C2:C7; B2:B7; F1) | ||
| 3 | 25-0114 | 40004000 | €18,650.00€ 18.650,00 | ||||
| 4 | 25-0207 | 45004500 | €860.00€ 860,00 | ||||
| 5 | 25-0233 | 46004600 | €540.00€ 540,00 | ||||
| 6 | 25-0251 | 45004500 | €1,385.00€ 1.385,00 | ||||
| 7 | 25-0260 | 40004000 | €19,120.00€ 19.120,00 | ||||
| 8 |
Swipe sideways to see all columns
Formula in F2
=SUMIFS(C2:C7,B2:B7, F1)
=SUMIFS(C2:C7;B2:B7; F1)
Result: €6,445.00€ 6.445,00
Step by step
- Excel reads
F1and finds4500. That is criteria1.C2:C7andB2:B7are both six rows, so the shapes match. - It tests each cell of
B2:B7against4500:B2yes,B3no,B4yes,B5no,B6yes,B7no. Rows 2, 4 and 6 pass. - It takes the cells in the same positions of
C2:C7:C2,C4andC6, which hold 4200, 860 and 1385. - It adds them: 4200 + 860 + 1385 = 6445. This is the figure you compare with the trial balance.
- Type 4000 in
F1and the result becomes 18650 + 19120 = 37770 without changing the formula.
Watch out: Amounts that the export stored as text are skipped without a warning, so the total comes out lower than the trial balance. If the difference is unexplained, check the column with ISNUMBER.
More on this example: why it works
Why it works
sum_range and criteria_range1 cover the same six rows, so position 3 in one is position 3 in the other. A criterion that is a plain cell means 'equal to', so every line on account 4500 is added and every other account is left out.
Intermediate
Purchase postings in the last month of the year
For the cut-off test you need the total of the purchase journal for December 2025. The list has postings on both sides of the month, including one on 31 December.
You type the first day of the month in F1 and the formula works out the window, so for the January test you change one cell.
| Row | A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|---|
| 1 | Entry no. | Date | Amount | Month | 1 Dec 2025 | ||
| 2 | 25-1180 | 28 Nov 2025 | €1,840.00€ 1.840,00 | Purchases | €7,135.00€ 7.135,00=SUMIFS(C2:C8, B2:B8, ">="&F1, B2:B8, "<="&EOMONTH(F1, 0))=SUMIFS(C2:C8; B2:B8; ">="&F1; B2:B8; "<="&EOMONTH(F1; 0)) | ||
| 3 | 25-1204 | 2 Dec 2025 | €2,350.00€ 2.350,00 | ||||
| 4 | 25-1231 | 15 Dec 2025 | €975.00€ 975,00 | ||||
| 5 | 25-1262 | 31 Dec 2025 | €3,200.00€ 3.200,00 | ||||
| 6 | 26-0003 | 2 Jan 2026 | €1,460.00€ 1.460,00 | ||||
| 7 | 25-1249 | 20 Dec 2025 | €610.00€ 610,00 | ||||
| 8 | 26-0011 | 14 Jan 2026 | €2,280.00€ 2.280,00 | ||||
| 9 |
Swipe sideways to see all columns
Formula in F2
=SUMIFS(C2:C8,B2:B8, ">="&F1, B2:B8, "<="&EOMONTH(F1, 0))
=SUMIFS(C2:C8;B2:B8; ">="&F1; B2:B8; "<="&EOMONTH(F1; 0))
Result: €7,135.00€ 7.135,00
Step by step
- Excel builds the first criterion.
F1holds 1 December 2025, which is the serial number 45992, so ">="&F1 becomes the text ">=45992". - It evaluates EOMONTH(F1, 0): the last day of the same month, 31 December 2025, serial 46022. The second criterion becomes "<=46022".
- Both criteria test
B2:B8. 28 November fails the first test. 2, 15, 31 and 20 December pass both. 2 and 14 January fail the second test. - The passing rows are 3, 4, 5 and 7. Their amounts are added: 2350 + 975 + 3200 + 610 = 7135. The posting of 31 December is included because the test is
<=, not<. - Leave out the second pair and SUMIFS returns everything from 1 December onward: 7135 + 1460 + 2280 = 10875. The optional pair is what closes the window.
- Change
F1to 1 January 2026 and the window moves to 1 to 31 January: 1460 + 2280 = 3740.
Watch out: If the dates carry a time, a posting at 14:30 on 31 December is larger than 46022 and fails <=. Use "<"&EOMONTH(F1, 0) + 1 to include the whole last day.
More on this example: why it works, 1 more pitfall, 1 variation
Why it works
Dates are serial numbers, so a date window is two numeric comparisons on the same column. Joining the operator with & turns a cell value into a criterion that Excel can split again, and EOMONTH supplies the upper bound so every month length, 28 to 31 days, is handled without a lookup table.
More to watch out for
- A date stored as text, for example from a CSV export, is never greater or smaller than a number, so it is silently left out. Check the column with ISNUMBER.
Variations
=SUMIFS(C2:C8,B2:B8, ">="&F1, B2:B8, "<"&EOMONTH(F1, 0) + 1)
=SUMIFS(C2:C8;B2:B8; ">="&F1; B2:B8; "<"&EOMONTH(F1; 0) + 1)
Half-open window: from the first day up to, but not including, the first day of the next month. Safe when dates carry times.
Advanced
Manual entries on two accounts at once
For journal entry testing you look at manual postings: entry numbers starting with MEM- come from the memorial journal. You want one figure for manual postings on the debiteuren (1300) and crediteuren (1600) accounts together. SUMIFS joins conditions with AND, so '1300 or 1600' needs a different construction.
| Row | A | B | C | D | E | F | G | H |
|---|---|---|---|---|---|---|---|---|
| 1 | Account | Entry no. | Amount | Accounts | 13001300 | |||
| 2 | 13001300 | MEM-25-0031 | €2,400.00€ 2.400,00 | 16001600 | ||||
| 3 | 16001600 | MEM-25-0044 | €1,850.00€ 1.850,00 | Manual postings | €8,555.00€ 8.555,00=SUM(SUMIFS(C2:C9, A2:A9, G1:G2, B2:B9, "MEM-*"))=SUM(SUMIFS(C2:C9; A2:A9; G1:G2; B2:B9; "MEM-*")) | |||
| 4 | 11001100 | MEM-25-0052 | €2,100.00€ 2.100,00 | |||||
| 5 | 13001300 | VRK-25-0873 | €640.00€ 640,00 | |||||
| 6 | 16001600 | MEM-25-0067 | €1,325.00€ 1.325,00 | |||||
| 7 | 13001300 | MEM-25-0090 | €2,980.00€ 2.980,00 | |||||
| 8 | 45004500 | INK-25-0412 | €510.00€ 510,00 | |||||
| 9 | 16001600 | BNK-25-0220 | €180.00€ 180,00 | |||||
| 10 |
Swipe sideways to see all columns
Formula in G3
=SUM(SUMIFS(C2:C9,A2:A9, G1:G2, B2:B9, "MEM-*"))
=SUM(SUMIFS(C2:C9;A2:A9; G1:G2; B2:B9; "MEM-*"))
Result: €8,555.00€ 8.555,00
Step by step
- Excel evaluates the inner SUMIFS first. Its criteria1 is not one cell but the two-cell range
G1:G2, so SUMIFS runs once for each value and returns two totals. - Pass one, account 1300: rows 2, 5 and 7 are on 1300. The second criterion
"MEM-*"means 'starts with MEM- followed by anything', soVRK-25-0873in row 5 fails. Rows 2 and 7 remain: 2400 + 2980 = 5380. - Pass two, account 1600: rows 3, 6 and 9 are on 1600.
BNK-25-0220in row 9 fails the wildcard test. Rows 3 and 6 remain: 1850 + 1325 = 3175. - The inner SUMIFS returns the array 5380 and 3175. On its own it would spill into two cells.
- SUM adds the array into one number: 5380 + 3175 = 8555. The manual posting on account 1100 in row 4 (2100) is correctly left out.
- Type 1100 in
G2instead of 1600 and the result becomes 5380 + 2100 = 7480.
Watch out: If G1 and G2 hold the same account, the rows are counted twice and the total is inflated with no warning. The OR trick only works for values that exclude each other.
More on this example: why it works, 2 more pitfalls, 2 variations
Why it works
Inside one SUMIFS all conditions are joined with AND. Giving a criterion several values makes SUMIFS repeat itself once per value, and adding those separate results is an OR. The wildcard handles the other condition, because * stands for any run of characters after the fixed prefix.
More to watch out for
- Without the outer SUM, the formula spills two numbers into
G3andG4, and anyone readingG3alone sees only the figure for 1300. "MEM*"without the hyphen would also match a code such asMEMO-25-0001. Include every fixed character you can in the pattern.
Variations
=SUMIFS(C2:C9,A2:A9, G1, B2:B9, "MEM-*") + SUMIFS(C2:C9, A2:A9, G2, B2:B9, "MEM-*")
=SUMIFS(C2:C9;A2:A9; G1; B2:B9; "MEM-*") + SUMIFS(C2:C9; A2:A9; G2; B2:B9; "MEM-*")
Two SUMIFS added by hand: longer, but readable to anyone and it works in every version without spilling.
=SUMPRODUCT(ISNUMBER(MATCH(A2:A9,G1:G2, 0)) * (LEFT(B2:B9, 4) = "MEM-") * C2:C9)
=SUMPRODUCT(ISNUMBER(MATCH(A2:A9;G1:G2; 0)) * (LEFT(B2:B9; 4) = "MEM-") * C2:C9)
The SUMPRODUCT route: MATCH tests membership of the account list, so duplicates in G1:G2 do not double-count.
MasterExcel 2021 or later (This example needs Excel 2021 or later)
Account by month grid from one spilled SUMIFS
You want to reconcile the fourth quarter to the monthly movements in the client's trial balance. A small grid of postings per account per month next to the journal lines does that, without a PivotTable that someone forgets to refresh.
The accounts run down E2:E3 and the first day of each month runs across F1:H1. One formula in F2 should fill the whole grid.
| Row | A | B | C | D | E | F | G | H | I |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Date | Account | Amount | Account | Oct | Nov | Dec | ||
| 2 | 8 Oct 2025 | 40004000 | €1,200.00€ 1.200,00 | 40004000 | €1,650.00€ 1.650,00=LET( dates, A2:A9, accounts, B2:B9, amounts, C2:C9, starts, F1:H1, ends, DATE(YEAR(starts), MONTH(starts) + 1, 1), SUMIFS(amounts, accounts, E2:E3, dates, ">="&starts, dates, "<"&ends) )=LET( dates; A2:A9; accounts; B2:B9; amounts; C2:C9; starts; F1:H1; ends; DATE(YEAR(starts); MONTH(starts) + 1; 1); SUMIFS(amounts; accounts; E2:E3; dates; ">="&starts; dates; "<"&ends) ) | €960.00€ 960,00 | €1,580.00€ 1.580,00 | ||
| 3 | 19 Oct 2025 | 45004500 | €870.00€ 870,00 | 45004500 | €870.00€ 870,00 | €1,845.00€ 1.845,00 | €720.00€ 720,00 | ||
| 4 | 31 Oct 2025 | 40004000 | €450.00€ 450,00 | ||||||
| 5 | 3 Nov 2025 | 45004500 | €1,340.00€ 1.340,00 | ||||||
| 6 | 14 Nov 2025 | 40004000 | €960.00€ 960,00 | ||||||
| 7 | 28 Nov 2025 | 45004500 | €505.00€ 505,00 | ||||||
| 8 | 1 Dec 2025 | 40004000 | €1,580.00€ 1.580,00 | ||||||
| 9 | 22 Dec 2025 | 45004500 | €720.00€ 720,00 | ||||||
| 10 |
Swipe sideways to see all columns
Formula in F2
=LET( dates,A2:A9, accounts, B2:B9, amounts, C2:C9, starts, F1:H1, ends, DATE(YEAR(starts), MONTH(starts) + 1, 1), SUMIFS(amounts, accounts, E2:E3, dates, ">="&starts, dates, "<"&ends) )
=LET( dates;A2:A9; accounts; B2:B9; amounts; C2:C9; starts; F1:H1; ends; DATE(YEAR(starts); MONTH(starts) + 1; 1); SUMIFS(amounts; accounts; E2:E3; dates; ">="&starts; dates; "<"&ends) )
Result: €1,650.00 | €960.00 | €1,580.00 / €870.00 | €1,845.00 | €720.00€ 1.650,00 | € 960,00 | € 1.580,00 / € 870,00 | € 1.845,00 | € 720,00
Step by step
- LET names the three data columns and the header row. They stay ranges, not arrays, which matters: SUMIFS accepts only ranges in its range arguments.
- ends is calculated from starts: YEAR gives 2025 three times and MONTH gives 10, 11 and 12. DATE(2025, 11, 1), DATE(2025, 12, 1) and DATE(2025, 13, 1) give the first day of each following month as a row of three dates; month 13 rolls over to 1 January 2026.
- In SUMIFS, the account criterion is a column of two values and the date criteria are rows of three. Excel pairs every account with every month and runs SUMIFS six times, returning a grid of two rows by three columns.
Account 4000:
- October: dates >= 1 October and < 1 November on 4000 are 8 and 31 October, so 1200 + 450 = 1650
- November: only 14 November, 960
- December: 1 December passes >= 1 December, so 1580
Account 4500:
- October: 19 October, 870
- November: 3 and 28 November, 1340 + 505 = 1845
- December: 22 December, 720
- The grid spills from
F2toH3. Check: 1650 + 960 + 1580 + 870 + 1845 + 720 = 7625, the same as the sum of all eight amounts, so every line landed in exactly one cell.
Watch out: The mirror-image mistake is "<="&ends. Then 1 December counts in both November and December: account 4000 in November becomes 960 + 1580 = 2540, and the grid total exceeds the list total by 1580. The control sum in the last step is how you catch it.
More on this example: why it works, 2 more pitfalls, 1 variation
Why it works
A column of criteria against a row of criteria makes Excel evaluate every combination, so one SUMIFS builds the whole cross-table. The half-open window, >= start and < next start, gives every date exactly one month with no gaps and no overlaps, whatever the month length.
Do not use this construction for tens of thousands of journal lines and a grid of hundreds of cells: every cell rescans the full list, and a PivotTable, which reads the data once, is faster there, at the cost of a manual refresh.
More to watch out for
- Binding accounts to a calculation, such as VALUE(B2:B9), turns it into an array. Excel then refuses the formula, because SUMIFS range arguments must be real ranges. Clean the source column instead.
- If the headers in
F1:H1are text such asOct, MONTH cannot read them and the grid fills with #VALUE!. They must be real dates, formatted to look like month names.
Variations
=SUMIFS($C$2:$C$9,$B$2:$B$9, $E2, $A$2:$A$9, ">="&F$1, $A$2:$A$9, "<"&EOMONTH(F$1, 0) + 1)
=SUMIFS($C$2:$C$9;$B$2:$B$9; $E2; $A$2:$A$9; ">="&F$1; $A$2:$A$9; "<"&EOMONTH(F$1; 0) + 1)
The classic version for Excel 2019 and earlier: one cell formula with mixed references, copied across and down the grid.
Try it yourself
Type a criterion for the account and pick a second one for the entry number: SUMIFS adds the debit only where both are met.
Second criterion (entry no.)
The pattern * accepts every entry number, so only the account decides.
Only entry numbers that start with 25-02 pass.
Every entry except 25-0101 passes.
| Row | A | B | C | D | E | F |
|---|---|---|---|---|---|---|
| 1 | Entry no. | Account | Debit | |||
| 2 | 25-0101 | 45004500 | €4,200.00€ 4.200,00 | Ledger total | €8,695.00€ 8.695,00=SUMIFS(C2:C9, B2:B9, "x", A2:A9, "*")=SUMIFS(C2:C9; B2:B9; "x"; A2:A9; "*") | |
| 3 | 25-0114 | 40004000 | €18,650.00€ 18.650,00 | |||
| 4 | 25-0207 | 45004500 | €860.00€ 860,00 | |||
| 5 | 25-0233 | 46004600 | €540.00€ 540,00 | |||
| 6 | 25-0251 | 45004500 | €1,385.00€ 1.385,00 | |||
| 7 | 25-0260 | 40004000 | €19,120.00€ 19.120,00 | |||
| 8 | 25-0302 | 45004500 | €2,250.00€ 2.250,00 | |||
| 9 | 25-0315 | €730.00€ 730,00 |
Swipe sideways to see all columns
- Formula cell
- Meets the criterion
=SUMIFS(C2:C9, B2:B9, "4500", A2:A9, "*")
=SUMIFS(C2:C9; B2:B9; "4500"; A2:A9; "*")
Result: €8,695.00€ 8.695,00
=SUMIFS(C2:C9, B2:B9, "4500", A2:A9, "25-02*")
=SUMIFS(C2:C9; B2:B9; "4500"; A2:A9; "25-02*")
Result: €2,245.00€ 2.245,00
=SUMIFS(C2:C9, B2:B9, "4500", A2:A9, "<>25-0101")
=SUMIFS(C2:C9; B2:B9; "4500"; A2:A9; "<>25-0101")
Result: €4,495.00€ 4.495,00
- matched as typed
- taken by *
- taken by ?
Common mistakes
| Symptom | Cause | Fix |
|---|---|---|
| 0 or #VALUE! after swapping the ranges | Arguments in SUMIF order, with the criteria range first and the sum range last. The result is 0 or #VALUE!. | In SUMIFS the sum_range always comes first. |
| A formula error, or 0 for a date or limit | Writing the operator outside the quotes, as in >=F1, or the cell inside them, as in ">=F1". The first is a formula error; the second compares with the literal text F1 and returns 0. | Put the operator in quotes and join the cell with &: ">="&F1. |
| 0 for 'North or East' | Two criteria on the same column that cannot both be true, such as region = North and region = East. SUMIFS returns 0. | Add two SUMIFS together, or pass both values as a range and wrap the result in SUM, as in the Advanced example. |
| #VALUE! with ranges of different length | The ranges have different lengths, for example C2:C50 and A2:A51, and the result is #VALUE!. | Select the same rows in every range, or use whole Table columns, which always match. |
Used in combinations
- Debtor age analysis table that ties to the control accountTotal the open amount per age band with one SUMIFS over a band table, add the bands up with SUM and check that the total agrees with the control account.
- Year-end cut-off test with FILTER and SUMFlag the sales invoices whose booking date and delivery date fall on different sides of year end and total them: two comparisons with the year-end date give TRUE or FALSE per date, FILTER keeps the invoices where the two differ, and SUM adds them up.Excel 2021 or later (This combination needs Excel 2021 or later)
- Journal entries where debit does not equal creditList the entries whose debit and credit totals differ: take the unique entry numbers, total debit and credit per entry with SUMIFS, and keep the unequal ones with FILTER over HSTACK, all named in one LET.Excel 2024 or later (This combination needs Excel 2024 or later)
- Mini trial balance from journal lines with HSTACK, UNIQUE and SUMIFSBuild a list of accounts with their net postings from raw journal lines: UNIQUE gives the accounts, SUMIFS totals each one, HSTACK puts both side by side and SORT orders them.Excel 2024 or later (This combination needs Excel 2024 or later)
- Receivables aging total per 30-day bandTurn every due date into a band with XLOOKUP and match_mode -1 on a band table, then let SUM add up the open amounts of one band.Excel 2021 or later (This combination needs Excel 2021 or later)
- Revenue per month for twelve months in one formulaTotal revenue for each of twelve months with one SUMIFS: SEQUENCE counts the months, EDATE turns each count into the first day of a month, and those dates become the criteria.Excel 2021 or later (This combination needs Excel 2021 or later)