MAXIFS
MAX.ALS.VOORWAARDEN in Dutch Excel
Returns the largest number among the rows that meet one or more conditions, and 0 when no row qualifies.
Last updated: 13 October 2026
| Row | A | B | C | D | E | F |
|---|---|---|---|---|---|---|
| 1 | Supplier | Date | Amount | Supplier | Roelofs BV | |
| 2 | Dekker BV | 6 Oct 2025 | €3,800.00€ 3.800,00 | Largest | €5,640.00€ 5.640,00=MAXIFS(C2:C7, A2:A7, F1)=MAXIFS(C2:C7; A2:A7; F1) | |
| 3 | Roelofs BV | 14 Oct 2025 | €1,275.50€ 1.275,50 | |||
| 4 | Hermans BV | 21 Oct 2025 | €8,900.00€ 8.900,00 | |||
| 5 | Roelofs BV | 4 Nov 2025 | €5,640.00€ 5.640,00 | |||
| 6 | Dekker BV | 18 Nov 2025 | €2,960.25€ 2.960,25 | |||
| 7 | Roelofs BV | 9 Dec 2025 | €3,115.00€ 3.115,00 |
Swipe sideways to see all columns
Result: €5,640.00€ 5.640,00
=MAXIFS(C2:C7,A2:A7, F1)
=MAXIFS(C2:C7;A2:A7; F1)
What MAXIFS does and when to use it
What it does: it returns the largest value among the rows that meet your criteria, for example the latest posting date on an account.
When to use it: when you need the highest value per group, such as the largest payment to a supplier or the most recent invoice per customer. It replaces the array formula MAX(IF(...)) and needs no Ctrl+Shift+Enter.
Two main gains:
- No array formula: MAXIFS is confirmed with Enter, where MAX(IF(...)) needs Ctrl+Shift+Enter in older versions.
- Several conditions in one formula: you add pairs of range and condition instead of nesting IF inside MAX.
How Excel evaluates it
Excel reads max_range and then the first pair. Row by row it tests the cell in criteria_range1 against criteria1, and a row that passes stays in. With more pairs, a row must pass every test. Excel then takes the largest number among the max_range cells of the rows that stayed in.
Watch out: When no row meets the conditions, MAXIFS returns 0 and not an error, so a result of 0 can mean that nothing matched.
Mental model
Filter the table with your conditions and glance at the biggest number left in the column. If the filter leaves nothing, the glance gives 0.
MAXIFS(max_range,criteria_range1, criteria1, [criteria_range2, criteria2], ...)
MAXIFS(max_range;criteria_range1; criteria1; [criteria_range2; criteria2]; ...)
| Argument | Type | Meaning |
|---|---|---|
max_range | Required | The cells the largest value is taken from. |
criteria_range1 | Required | The range the first condition is tested against. |
criteria1 | Required | The condition: a value, a cell reference or text such as ">=100". |
criteria_range2 | Optional | An optional second range to test; same size as the first. |
criteria2 | Optional | The condition that goes with the second range. |
Return value:A number: the largest value among matching rows, or 0 if none match
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
Largest payment to one supplier
For the purchases cycle at Veldhuis Installatie BV you have the bank payments to three suppliers in the last quarter of 2025. You want the largest single payment to the supplier named in F1, to compare with the approval limit for payments. MAX without a condition would return the largest payment of all suppliers together.
| Row | A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|---|
| 1 | Supplier | Date | Amount | Supplier | Roelofs BV | ||
| 2 | Dekker BV | 6 Oct 2025 | €3,800.00€ 3.800,00 | Largest | €5,640.00€ 5.640,00=MAXIFS(C2:C7, A2:A7, F1)=MAXIFS(C2:C7; A2:A7; F1) | ||
| 3 | Roelofs BV | 14 Oct 2025 | €1,275.50€ 1.275,50 | ||||
| 4 | Hermans BV | 21 Oct 2025 | €8,900.00€ 8.900,00 | ||||
| 5 | Roelofs BV | 4 Nov 2025 | €5,640.00€ 5.640,00 | ||||
| 6 | Dekker BV | 18 Nov 2025 | €2,960.25€ 2.960,25 | ||||
| 7 | Roelofs BV | 9 Dec 2025 | €3,115.00€ 3.115,00 | ||||
| 8 |
Swipe sideways to see all columns
Formula in F2
=MAXIFS(C2:C7,A2:A7, F1)
=MAXIFS(C2:C7;A2:A7; F1)
Result: €5,640.00€ 5.640,00
Step by step
- Excel reads
F1and finds Roelofs BV. That is criteria1, and it is tested againstA2:A7. It tests
A2:A7row by row:A2is Dekker, noA3is Roelofs, yesA4is Hermans, noA5is Roelofs, yesA6is Dekker, noA7is Roelofs, yes
Rows 3, 5 and 7 stay in.
- From
C2:C7Excel now looks at the cells of those rows only:C3is 1,275.501.275,50,C5is 5,640.005.640,00 andC7is 3,115.003.115,00. - The largest of the three is 5,640.005.640,00, so
F2shows 5,640.005.640,00. The payment of 8,900.008.900,00 is larger, but it belongs to Hermans BV and plays no part. - Change
F1to Dekker BV and the result becomes 3,800.003.800,00, the larger of 3,800.003.800,00 and 2,960.252.960,25.
Watch out: Type a supplier name that is not in the list, or one with a space at the end, and the result is 0, not an error. A real payment of 0.00 would look the same, so check the name whenever you see 0.
More on this example: why it works, 1 variation
Why it works
max_range and criteria_range1 have the same height, so the third row of one is the third row of the other. The condition selects rows first and the maximum is taken afterwards, which is why a larger payment to another supplier cannot leak into the answer.
Variations
=MAX(C2:C7)
=MAX(C2:C7)
Without the supplier condition you get the largest payment overall, 8,900.008.900,00. Use it as a comparison base.
Intermediate
Latest invoice date per customer up to the cut-off
For the cut-off test on sales you want, for one customer, the date of the most recent sales invoice on or before the balance sheet date of 31 December 2025.
The list also holds invoices from January 2026. They belong to the next year and must not count. The formula sits in F4 and is meant to be copied down for more customers, so the ranges are locked.
| Row | A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|---|
| 1 | Invoice no. | Customer | Invoice date | Cut-off date | 31 Dec 2025 | ||
| 2 | F-25-0381 | Jansen Dakbedekking BV | 14 Nov 2025 | ||||
| 3 | F-25-0392 | Visser Metaalbouw BV | 9 Dec 2025 | Customer | Latest invoice | ||
| 4 | F-25-0407 | Jansen Dakbedekking BV | 22 Dec 2025 | Jansen Dakbedekking BV | 22 Dec 202522 Dec 2025=MAXIFS($C$2:$C$8, $B$2:$B$8, E4, $C$2:$C$8, "<="&$F$1)=MAXIFS($C$2:$C$8; $B$2:$B$8; E4; $C$2:$C$8; "<="&$F$1) | ||
| 5 | F-26-0003 | Jansen Dakbedekking BV | 8 Jan 2026 | ||||
| 6 | F-25-0415 | Visser Metaalbouw BV | 30 Dec 2025 | ||||
| 7 | F-25-0371 | Mulder Kozijnen BV | 27 Oct 2025 | ||||
| 8 | F-26-0001 | Visser Metaalbouw BV | 5 Jan 2026 | ||||
| 9 |
Swipe sideways to see all columns
Formula in F4
=MAXIFS($C$2:$C$8,$B$2:$B$8, E4, $C$2:$C$8, "<="&$F$1)
=MAXIFS($C$2:$C$8;$B$2:$B$8; E4; $C$2:$C$8; "<="&$F$1)
Result: 22 Dec 202522 Dec 2025
Step by step
- Excel reads the first pair: criteria_range1 is
B2:B8and criteria1 isE4, Jansen Dakbedekking BV. Rows 2, 4 and 5 have that customer:B2,B4andB5. - Excel reads the second pair.
F1holds 31 December 2025, which is the serial number 46022. The & turns it into the text "<=46022", so a row passes when its date in C is 46022 or lower. - Of the three Jansen rows,
C2(14 November 2025, 45975) andC4(22 December 2025, 46013) pass.C5(8 January 2026, 46030) fails the date test and drops out. A row must pass both tests. - The largest of 45975 and 46013 is 46013, so
F4shows 22 December 2025. Without the second pair the answer would be 8 January 2026, an invoice that belongs to the next year. - Type Visser Metaalbouw BV in
E4andF4shows 30 December 2025: the invoice of 5 January 2026 is out, 9 December and 30 December are in.
Watch out: Write "<=F1" without the & and Excel compares with the text F1. No date passes and the result is 0, which a date format shows as 0 January 1900.
More on this example: why it works, 1 more pitfall, 1 variation
Why it works
The date column is both the range to take the maximum from and a criteria range. That is allowed: Excel first selects the rows that pass the cut-off, then takes the maximum of those same dates. The $ signs keep all three ranges in place when you copy the formula down, while E4 moves along to the next customer.
More to watch out for
- Invoice dates that came in as text from an export are skipped silently: the customer then seems to have no invoice or an older one. Check the column with COUNT or look for left-aligned dates.
Variations
=MAXIFS($C$2:$C$8,$B$2:$B$8, E4)
=MAXIFS($C$2:$C$8;$B$2:$B$8; E4)
Without the cut-off you get the latest invoice of any date, 8 January 2026 for Jansen. Use it for a first look, never for the cut-off test.
Advanced
Test whether a supplier invoices close to the approval limit
In the purchases cycle every invoice of 10,000.0010.000,00 or more needs approval from the directors. You test whether the supplier in F1 stays close to that limit on purpose, which can point to split invoices.
You want the largest invoice below the limit in F2, and a flag when it lies within the margin in F3 (5%) of the limit.
| Row | A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|---|
| 1 | Supplier | Invoice no. | Amount | Supplier | Dijkman Bouwstoffen BV | ||
| 2 | Dijkman Bouwstoffen BV | INK-5102 | €9,650.00€ 9.650,00 | Approval limit | 1000010000 | ||
| 3 | Brouwer Installatie BV | INK-5103 | €14,200.00€ 14.200,00 | Margin | 0.050,05 | ||
| 4 | Dijkman Bouwstoffen BV | INK-5107 | €11,800.00€ 11.800,00 | Check | Near the limit=IF(MAXIFS(C2:C9, A2:A9, F1, C2:C9, "<"&F2) >= F2 * (1 - F3), "Near the limit", "Clear of the limit")=IF(MAXIFS(C2:C9; A2:A9; F1; C2:C9; "<"&F2) >= F2 * (1 - F3); "Near the limit"; "Clear of the limit") | ||
| 5 | Dijkman Bouwstoffen BV | INK-5111 | €9,890.00€ 9.890,00 | ||||
| 6 | Smit Gereedschap BV | INK-5112 | €4,350.00€ 4.350,00 | ||||
| 7 | Dijkman Bouwstoffen BV | INK-5118 | €7,200.00€ 7.200,00 | ||||
| 8 | Brouwer Installatie BV | INK-5121 | €9,940.00€ 9.940,00 | ||||
| 9 | Dijkman Bouwstoffen BV | INK-5125 | €12,500.00€ 12.500,00 | ||||
| 10 |
Swipe sideways to see all columns
Formula in F4
=IF(MAXIFS(C2:C9,A2:A9, F1, C2:C9, "<"&F2) >= F2 * (1 - F3), "Near the limit", "Clear of the limit")
=IF(MAXIFS(C2:C9;A2:A9; F1; C2:C9; "<"&F2) >= F2 * (1 - F3); "Near the limit"; "Clear of the limit")
Result: Near the limit
Step by step
- Excel reads
F1(Dijkman Bouwstoffen BV),F2(10000) andF3(0.05). The test of IF starts with MAXIFS, which has two pairs:A2:A9againstF1, andC2:C9against the text "<10000" that the & builds fromF2. - The supplier test keeps rows 2, 4, 5, 7 and 9, with amounts 9,650.009.650,00, 11,800.0011.800,00, 9,890.009.890,00, 7,200.007.200,00 and 12,500.0012.500,00.
- The amount test removes 11,800.0011.800,00 and 12,500.0012.500,00, because those invoices were above the limit and had to be approved anyway. Left are 9,650.009.650,00, 9,890.009.890,00 and 7,200.007.200,00, so MAXIFS returns 9,890.009.890,00. The Brouwer invoice of 14,200.0014.200,00 and the Smit invoice play no part.
- The other side of the comparison is F2 * (1 - F3) = 10,00010.000 * 0.95 = 9,500.009.500,00, the lowest amount that counts as near the limit.
- 9,890.009.890,00 >= 9,500.009.500,00 is TRUE, so IF returns its second argument and
F4shows Near the limit. - Change
F1to Smit Gereedschap BV: the only invoice is 4,350.004.350,00, which is below 9,500.009.500,00, soF4shows Clear of the limit. Brouwer Installatie BV gives 9,940.009.940,00 and Near the limit.
Watch out: A supplier with no invoice below the limit, or a name with a typo, gives 0 from MAXIFS. Since 0 is below 9,500.009.500,00 the flag reads Clear of the limit without any error, so a clear result is only as reliable as the supplier name in F1.
More on this example: why it works, 2 more pitfalls, 2 variations
Why it works
The amount column is both max_range and a criteria range, which MAXIFS allows. The condition "<"&F2 removes the invoices that already needed approval before the maximum is taken, so a large approved invoice cannot hide the one closest below the limit. The limit and the margin sit in cells, so a change of policy needs no formula edit.
More to watch out for
- Write "<="&F2 and an invoice of exactly 10,000.0010.000,00 counts as below the limit, although it needed approval. It would be flagged as Near the limit for the wrong reason.
- Amounts stored as text (for example from an export) are skipped by MAXIFS, so the largest invoice below the limit can be too low and the flag stays clear. Check the amount column with COUNT.
Variations
=MAXIFS(C2:C9,A2:A9, F1, C2:C9, "<"&F2)
=MAXIFS(C2:C9;A2:A9; F1; C2:C9; "<"&F2)
The amount itself instead of the flag: 9,890.009.890,00 for Dijkman. Use it when you want to read the figure.
=COUNTIFS(A2:A9,F1, C2:C9, ">="&F2 * (1 - F3), C2:C9, "<"&F2)
=COUNTIFS(A2:A9;F1; C2:C9; ">="&F2 * (1 - F3); C2:C9; "<"&F2)
Counts the invoices in the band from 9,500.009.500,00 up to the limit: 2 for Dijkman (9,650.009.650,00 and 9,890.009.890,00). Several invoices in that band are stronger evidence of splitting than one.
MasterExcel 2021 or later (This example needs Excel 2021 or later)
Days since the last qualifying payment per supplier
For a test on inactive suppliers at 31 December 2025 you want, for each supplier in the master data, the number of days since the last payment of at least 1,000.001.000,00 on or before the report date.
A supplier without such a payment must read 'No payment' and not 'days since 30 December 1899'. Payments after the report date are subsequent events and must not count.
| Row | A | B | C | D | E | F | G | H | I |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Supplier | Payment date | Amount | Supplier | Days since last payment | Report date | 31 Dec 2025 | ||
| 2 | Bakker Elektro BV | 12 Sep 2025 | €4,200.00€ 4.200,00 | Bakker Elektro BV | 2626=LET( suppliers, E2:E5, cutoff, H1, minAmt, H2, last, MAXIFS(B2:B9, A2:A9, suppliers, B2:B9, "<="&cutoff, C2:C9, ">="&minAmt), IF(last = 0, "No payment", cutoff - last) )=LET( suppliers; E2:E5; cutoff; H1; minAmt; H2; last; MAXIFS(B2:B9; A2:A9; suppliers; B2:B9; "<="&cutoff; C2:C9; ">="&minAmt); IF(last = 0; "No payment"; cutoff - last) ) | Minimum payment | 10001000 | ||
| 3 | Kuipers Kabel BV | 20 Oct 2025 | €6,325.00€ 6.325,00 | Kuipers Kabel BV | 4747 | ||||
| 4 | Bakker Elektro BV | 5 Dec 2025 | €3,150.00€ 3.150,00 | Sanders Leidingwerk BV | 149149 | ||||
| 5 | Kuipers Kabel BV | 18 Dec 2025 | €250.00€ 250,00 | Hofman Isolatie BV | No payment | ||||
| 6 | Sanders Leidingwerk BV | 4 Aug 2025 | €9,600.00€ 9.600,00 | ||||||
| 7 | Bakker Elektro BV | 9 Jan 2026 | €5,100.00€ 5.100,00 | ||||||
| 8 | Kuipers Kabel BV | 14 Nov 2025 | €2,740.75€ 2.740,75 | ||||||
| 9 | Sanders Leidingwerk BV | 29 Aug 2025 | €780.00€ 780,00 | ||||||
| 10 |
Swipe sideways to see all columns
Formula in F2
=LET( suppliers,E2:E5, cutoff, H1, minAmt, H2, last, MAXIFS(B2:B9, A2:A9, suppliers, B2:B9, "<="&cutoff, C2:C9, ">="&minAmt), IF(last = 0, "No payment", cutoff - last) )
=LET( suppliers;E2:E5; cutoff; H1; minAmt; H2; last; MAXIFS(B2:B9; A2:A9; suppliers; B2:B9; "<="&cutoff; C2:C9; ">="&minAmt); IF(last = 0; "No payment"; cutoff - last) )
Result: 26, 47, 149 and No payment26. 47. 149 and No payment
Step by step
- LET reads its arguments in pairs. suppliers becomes
E2:E5, cutoff becomesH1(31 December 2025, serial 46022) and minAmt becomesH2(1000). Nothing is calculated yet. - The fourth pair defines last. MAXIFS gets a range as its first criterion, so it runs once per supplier, each time with three tests: supplier equal to the name, date "<=46022" and amount ">=1000".
The three tests leave these rows per supplier:
- Bakker: row 7 (9 January 2026) fails the date test and rows 2 and 4 pass; the latest of 12 September (45912) and 5 December 2025 (45996) is 45996
- Kuipers: row 5 (250.00) fails the amount test and rows 3 and 8 pass; the latest is 14 November 2025 (45975)
- Sanders: row 9 (780.00) fails the amount test and row 6 passes: 4 August 2025 (45873)
- Hofman: no rows at all, so 0
- last is now the column 45996, 45975, 45873, 0. The last argument of LET is the calculation. IF tests last = 0 for each element: FALSE, FALSE, FALSE, TRUE.
- For the first three, Excel calculates 46022 - last: 26, 47 and 149 days. For Hofman it returns the text No payment. The four results spill into
F2:F5. - Set
H1to 31 January 2026 (serial 46053) and the 9 January payment of Bakker counts: the result for Bakker becomes 46053 - 46031 = 22 days.
Watch out: The mirror image looks right: write ">="&cutoff instead of "<="&cutoff and the formula sees only payments after the report date. With these rows it returns -9 for Bakker (its payment of 9 January 2026) and No payment for the other three suppliers. On a long list this can pass for an exception report, so always test with a payment dated after the report date.
More on this example: why it works, 2 more pitfalls, 1 variation
Why it works
A genuine last-payment date is a serial number far above 0, so a result of 0 can only mean 'nothing matched', and the IF turns that into text in one place. LET names the three inputs once, so the conditions read like the audit procedure and a reviewer changes the report date in a single cell.
Do not use this construction when you also need the reference or amount of that last payment: MAXIFS returns only the date. Use FILTER with TAKE, or a PivotTable with the maximum of the payment date per supplier; the PivotTable needs a refresh after the data changes but copes better with thousands of suppliers than one MAXIFS per supplier.
More to watch out for
- Payment dates stored as text (a typical result of an export) are skipped by MAXIFS, so a supplier that paid last month reads 'No payment'. Check the date column with COUNT.
- LET and a spilled result need Microsoft 365 or Excel 2021. In Excel 2019 build one formula per supplier without LET.
Variations
=MAXIFS(B2:B9,A2:A9, E2, B2:B9, "<="&H1, C2:C9, ">="&H2)
=MAXIFS(B2:B9;A2:A9; E2; B2:B9; "<="&H1; C2:C9; ">="&H2)
One supplier per formula, without LET. The 0 for 'no payment' still has to be caught separately.
Try it yourself
Type a criterion for the amount and see the largest invoice that still passes it.
| Row | A | B | C | D | E | F |
|---|---|---|---|---|---|---|
| 1 | Supplier | Date | Amount | |||
| 2 | Dekker BV | 6 Oct 2025 | €3,800.00€ 3.800,00 | Largest | €3,800.00€ 3.800,00=MAXIFS(C2:C8, C2:C8, "x")=MAXIFS(C2:C8; C2:C8; "x") | |
| 3 | Roelofs BV | 14 Oct 2025 | €1,275.50€ 1.275,50 | |||
| 4 | Hermans BV | 21 Oct 2025 | €8,900.00€ 8.900,00 | |||
| 5 | Roelofs BV | 4 Nov 2025 | €5,640.00€ 5.640,00 | |||
| 6 | Dekker BV | 18 Nov 2025 | €2,960.25€ 2.960,25 | |||
| 7 | Roelofs BV | 9 Dec 2025 | €3,115.00€ 3.115,00 | |||
| 8 | Hermans BV | 15 Dec 2025 | €480.00€ 480,00 |
Swipe sideways to see all columns
- Formula cell
- Meets the criterion
=MAXIFS(C2:C8, C2:C8, "<5000")
=MAXIFS(C2:C8; C2:C8; "<5000")
Result: €3,800.00€ 3.800,00
- matched as typed
- taken by *
- taken by ?
Common mistakes
| Symptom | Cause | Fix |
|---|---|---|
| #NAME? in Excel 2016 or earlier | The workbook is opened in Excel 2016 or earlier and the cell shows #NAME?, because MAXIFS does not exist there. | The function arrived in Excel 2019. For older versions use =MAX(IF(...)) confirmed with Ctrl+Shift+Enter, or AGGREGATE with function_num 14 and option 6, which skips errors. |
| 0 shown although no row matches | A 0 is read as a real maximum, while no row met the conditions (a supplier name with a typo or a trailing space). Formatted as a date, that 0 shows as 0 January 1900. | Count the matching rows with COUNTIFS and the same conditions, or wrap the formula: IF(COUNTIFS(...) = 0, "No match", MAXIFS(...)). |
| #VALUE! with ranges of different size | The ranges differ in size, for example C2:C9 for max_range and A2:A8 for criteria_range1, and the result is #VALUE!. | Select the same rows in every range, and lock them with $ when you copy the formula down. |
| 0 although rows should match | An operator is written against a cell without &, such as "<=F1". Excel compares with the text F1, nothing matches and the result is 0. | Write the operator in quotes and join the cell: "<="&F1. |