Available in:Excel 2007 or later (Works in Excel 2007, every later version, Microsoft 365 and Excel for the web)Examples need Excel 2021 or laterCategory:Math

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.

Difficulty rating 3 of 5. Each condition is simple, but criteria written as text with operators, dates as criteria and the AND-only logic take practice.

Last updated: 13 October 2026

See the worked examples

Sheet excerpt: F2 holds the formula
RowABCDEF
1Entry no.AccountDebitAccount45004500
225-010145004500€4,200.00€ 4.200,00Ledger total€6,445.00€ 6.445,00=SUMIFS(C2:C7, B2:B7, F1)=SUMIFS(C2:C7; B2:B7; F1)
325-011440004000€18,650.00€ 18.650,00
425-020745004500€860.00€ 860,00
525-023346004600€540.00€ 540,00
625-025145004500€1,385.00€ 1.385,00
725-026040004000€19,120.00€ 19.120,00
Formula cell (F2)Input

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.

Terms used on this page: criteria, operator, range, cell

SUMIFS(sum_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
SUMIFS(sum_range; criteria_range1; criteria1; [criteria_range2; criteria2]; ...)
Arguments
ArgumentTypeMeaning
sum_rangeRequiredThe cells whose numbers are added when a row passes every test.
criteria_range1RequiredThe range the first condition is tested on; same size as sum_range.
criteria1RequiredThe test: a value, a cell, or text such as ">=100" or "MEM-*".
criteria_range2OptionalRange for a further condition; pairs repeat up to 127 times.
criteria2OptionalThe 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.

Sheet excerpt: F2 holds the formula
RowABCDEFG
1Entry no.AccountDebitAccount45004500
225-010145004500€4,200.00€ 4.200,00Ledger total€6,445.00€ 6.445,00=SUMIFS(C2:C7, B2:B7, F1)=SUMIFS(C2:C7; B2:B7; F1)
325-011440004000€18,650.00€ 18.650,00
425-020745004500€860.00€ 860,00
525-023346004600€540.00€ 540,00
625-025145004500€1,385.00€ 1.385,00
725-026040004000€19,120.00€ 19.120,00
8
Formula cell (F2)Input

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
  1. Excel reads F1 and finds 4500. That is criteria1. C2:C7 and B2:B7 are both six rows, so the shapes match.
  2. It tests each cell of B2:B7 against 4500: B2 yes, B3 no, B4 yes, B5 no, B6 yes, B7 no. Rows 2, 4 and 6 pass.
  3. It takes the cells in the same positions of C2:C7: C2, C4 and C6, which hold 4200, 860 and 1385.
  4. It adds them: 4200 + 860 + 1385 = 6445. This is the figure you compare with the trial balance.
  5. Type 4000 in F1 and 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.

Sheet excerpt: F2 holds the formula
RowABCDEFG
1Entry no.DateAmountMonth1 Dec 2025
225-118028 Nov 2025€1,840.00€ 1.840,00Purchases€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))
325-12042 Dec 2025€2,350.00€ 2.350,00
425-123115 Dec 2025€975.00€ 975,00
525-126231 Dec 2025€3,200.00€ 3.200,00
626-00032 Jan 2026€1,460.00€ 1.460,00
725-124920 Dec 2025€610.00€ 610,00
826-001114 Jan 2026€2,280.00€ 2.280,00
9
Formula cell (F2)Input

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
  1. Excel builds the first criterion. F1 holds 1 December 2025, which is the serial number 45992, so ">="&F1 becomes the text ">=45992".
  2. It evaluates EOMONTH(F1, 0): the last day of the same month, 31 December 2025, serial 46022. The second criterion becomes "<=46022".
  3. 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.
  4. 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 <.
  5. 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.
  6. Change F1 to 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.

Sheet excerpt: G3 holds the formula
RowABCDEFGH
1AccountEntry no.AmountAccounts13001300
213001300MEM-25-0031€2,400.00€ 2.400,0016001600
316001600MEM-25-0044€1,850.00€ 1.850,00Manual 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-*"))
411001100MEM-25-0052€2,100.00€ 2.100,00
513001300VRK-25-0873€640.00€ 640,00
616001600MEM-25-0067€1,325.00€ 1.325,00
713001300MEM-25-0090€2,980.00€ 2.980,00
845004500INK-25-0412€510.00€ 510,00
916001600BNK-25-0220€180.00€ 180,00
10
Formula cell (G3)Input

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
  1. 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.
  2. Pass one, account 1300: rows 2, 5 and 7 are on 1300. The second criterion "MEM-*" means 'starts with MEM- followed by anything', so VRK-25-0873 in row 5 fails. Rows 2 and 7 remain: 2400 + 2980 = 5380.
  3. Pass two, account 1600: rows 3, 6 and 9 are on 1600. BNK-25-0220 in row 9 fails the wildcard test. Rows 3 and 6 remain: 1850 + 1325 = 3175.
  4. The inner SUMIFS returns the array 5380 and 3175. On its own it would spill into two cells.
  5. SUM adds the array into one number: 5380 + 3175 = 8555. The manual posting on account 1100 in row 4 (2100) is correctly left out.
  6. Type 1100 in G2 instead 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 G3 and G4, and anyone reading G3 alone sees only the figure for 1300.
  • "MEM*" without the hyphen would also match a code such as MEMO-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.

Sheet excerpt: F2 holds the formula
RowABCDEFGHI
1DateAccountAmountAccountOctNovDec
28 Oct 202540004000€1,200.00€ 1.200,0040004000€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
319 Oct 202545004500€870.00€ 870,0045004500€870.00€ 870,00€1,845.00€ 1.845,00€720.00€ 720,00
431 Oct 202540004000€450.00€ 450,00
53 Nov 202545004500€1,340.00€ 1.340,00
614 Nov 202540004000€960.00€ 960,00
728 Nov 202545004500€505.00€ 505,00
81 Dec 202540004000€1,580.00€ 1.580,00
922 Dec 202545004500€720.00€ 720,00
10
Formula cell (F2)InputSpilled resultNote: F1:H1 hold real dates (the first of each month) formatted to show only the month name.

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
  1. 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.
  2. 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.
  3. 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.
  4. 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
  5. Account 4500:

    • October: 19 October, 870
    • November: 3 and 28 November, 1340 + 505 = 1845
    • December: 22 December, 720
  6. The grid spills from F2 to H3. 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:H1 are text such as Oct, 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.

Sheet excerpt: F2 holds the formula
RowABCDEF
1Entry no.AccountDebit
225-010145004500€4,200.00€ 4.200,00Ledger total€8,695.00€ 8.695,00=SUMIFS(C2:C9, B2:B9, "x", A2:A9, "*")=SUMIFS(C2:C9; B2:B9; "x"; A2:A9; "*")
325-011440004000€18,650.00€ 18.650,00
425-020745004500€860.00€ 860,00
525-023346004600€540.00€ 540,00
625-025145004500€1,385.00€ 1.385,00
725-026040004000€19,120.00€ 19.120,00
825-030245004500€2,250.00€ 2.250,00
925-0315€730.00€ 730,00
Formula cell (F2)
  • 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

Common mistakes

Common mistakes
SymptomCauseFix
0 or #VALUE! after swapping the rangesArguments 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 limitWriting 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 lengthThe 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)