To find the largest value that meets a condition — the biggest West-region order, the top score in a class — use MAXIFS. It’s MAX with built-in filtering, no array formula required.
The example
Orders by region. We want the biggest West order.
| A | B | C | E | F | ||
|---|---|---|---|---|---|---|
| 1 | Rep | Region | Amount | Region | Max | |
| 2 | Ana | West | $120 | West | $180 | |
| 3 | Ben | East | $300 | |||
| 4 | Cy | West | $180 | |||
| 5 | Dot | East | $70 | |||
| 6 | Eve | West | $150 |
The formula
The largest West order — note East’s $300 is correctly ignored:
How it works
MAXIFS filters, then takes the maximum:
- The first argument,
C2:C6, is the range to take the maximum from. - The pair
B2:B6, "West"keeps only West rows. - MAXIFS returns the largest value among those matching rows —
180— ignoring East’s larger $300. - Add more range, criteria pairs for additional conditions (AND logic).
Before Excel 2019? Use an array formula: =MAX(IF(B2:B6="West", C2:C6)) entered with Ctrl+Shift+Enter.
Try it: interactive demo
Pick a region; see the largest order in it.
Variations
Max with two conditions
Largest West Widget order:
Max within a number range
Biggest order that’s under $200:
Legacy array version
For Excel 2016 and older (Ctrl+Shift+Enter):
Pitfalls & errors
MAXIFS needs Excel 2019+. Older versions show #NAME? — use the MAX(IF()) array formula instead.
Returns 0 when nothing matches. If no row meets the criteria, MAXIFS gives 0, not an error — which can be mistaken for a real value. Check your criteria if you see an unexpected 0.
Ranges must be the same size. The max range and every criteria range need identical dimensions, or you get #VALUE!.
Practice workbook
Frequently asked questions
How do I find the maximum value with a condition in Excel?
How do I do MAXIFS in older Excel?
Why does MAXIFS return 0?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class