Free MAXIFS practice
MAXIFS practice exercises
MAXIFS returns the largest value among the rows that meet one or more conditions. 5 reps, from easy to hard, each checked in a real spreadsheet engine. 2 free, 3 with Pro.
=MAXIFS(max_range, criteria_range1, criteria1, ...)
MAXIFS guide
How to use MAXIFS in Excel
MAXIFS returns the largest number in a column among the rows that meet your conditions: the biggest North order, the highest score in one class. It's like MAX with a filter in front.
It is available in Excel 2019 and later, including Microsoft 365. When no row matches, it returns 0 rather than an error.
Syntax
=MAXIFS(max_range, criteria_range1, criteria1, ...)
| Argument | What it is |
|---|---|
max_range | The numbers to search for the largest value, such as D2:D7. |
criteria_range1 | The column to check, with the same number of rows as max_range. |
criteria1 | What that column must match: text in quotes, a cell, or a comparison. |
... | More range and criteria pairs. |
Examples
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Region | Product | Units | Sales | Top North sale | |
| 2 | North | Widget | 4 | 200 | 375 | |
| 3 | South | Gadget | 2 | 150 | ||
| 4 | North | Gadget | 5 | 375 | ||
| 5 | East | Widget | 3 | 150 | ||
| 6 | North | Widget | 1 | 50 | ||
| 7 | South | Widget | 6 | 300 |
=MAXIFS(D2:D7,A2:A7,"North") returns 375.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Region | Product | Units | Sales | Top North widget | |
| 2 | North | Widget | 4 | 200 | 200 | |
| 3 | South | Gadget | 2 | 150 | ||
| 4 | North | Gadget | 5 | 375 | ||
| 5 | East | Widget | 3 | 150 | ||
| 6 | North | Widget | 1 | 50 | ||
| 7 | South | Widget | 6 | 300 |
=MAXIFS(D2:D7,A2:A7,"North",B2:B7,"Widget") returns 200.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Region | Product | Units | Sales | Most South units | |
| 2 | North | Widget | 4 | 200 | 6 | |
| 3 | South | Gadget | 2 | 150 | ||
| 4 | North | Gadget | 5 | 375 | ||
| 5 | East | Widget | 3 | 150 | ||
| 6 | North | Widget | 1 | 50 | ||
| 7 | South | Widget | 6 | 300 |
=MAXIFS(C2:C7,A2:A7,"South") returns 6.
Common mistakes
Using MAX when there is a condition
MAX looks at every row. The task asks for the biggest Widget sale, which is 300, not the 375 Gadget order.
Wrong=MAX(D2:D7) → 375
Right=MAXIFS(D2:D7,B2:B7,"Widget") → 300
Checking the wrong column
North is a region, but this checks the Product column, so nothing matches and MAXIFS returns 0, which looks like a real answer.
Wrong=MAXIFS(D2:D7,B2:B7,"North") → 0
Right=MAXIFS(D2:D7,A2:A7,"North") → 375
MAXIFS questions
Which Excel versions have MAXIFS?
Excel 2019, 2021, 2024, Microsoft 365 and Excel on the web. In older versions use =MAX(IF(A2:A7="North",D2:D7)) as an array formula.
What does MAXIFS return when nothing matches?
0, not an error. If 0 could also be a real result, check the count first with COUNTIFS.
How do I find the name that goes with the largest value?
Use MAXIFS to get the value, then XLOOKUP or INDEX with MATCH to find the row that has it.
Related functions
Reading is the warm-up
The reps are what make it stick. Try MAXIFS in the practice sheet above.