MAXIFS Function
Returns the largest value among cells that meet one or more conditions.
Category
Statistical
Available in
Excel 2019+, Microsoft 365
Returns
A number
Overview
MAXIFS returns the largest value in one range, looking only at rows where every condition is true.
Criteria can be a value ("North", 50000), a comparison in quotes (">=50000", "<>North"), a comparison joined to a cell (">="&F2), or a pattern with wildcards — * for any characters, ? for one character ("A*", "?d"). Text matching ignores upper/lower case.
Syntax
Arguments
| Argument | Required? | What it does |
|---|---|---|
| max_range | Yes | The cells to find the largest value in. |
| criteria_range1 | Yes | The first range to test, the same size as max_range. |
| criteria1 | Yes | The condition for criteria_range1. |
| criteria_range2, criteria2, … | No | Up to 126 more range/condition pairs. |
Examples
Example 1 — Best result per region
The last one adds a second condition: reps whose name starts with B.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Rep | Region | Sales | Measure | Result |
| 2 | Ana | North | 62000 | North | 62000 |
| 3 | Ben | South | 48500 | East | 71250 |
| 4 | Cy | North | 50000 | South, B… | 48500 |
| 5 | Di | East | 71250 | ||
| 6 | Ed | South | 39800 | ||
| 7 | Fay | North | 55400 | ||
| 8 | Gus | East | 48500 |
Common mistakes
- 0 when nothing matches. If no row meets the conditions, MAXIFS returns 0 — not an error. Check with COUNTIFS if 0 could be a real answer.
- #VALUE! max_range and the criteria ranges are different sizes.
- Comparison without quotes. =COUNTIF(C2:C8,>50000) is an error. Write ">50000" in quotes, or ">"&F2 to use a cell.
- Putting the cell inside the quotes. ">F2" compares with the text "F2". Join the cell instead: ">"&F2.
Notes
- In older versions, use =MAX(IF(B2:B8="North",C2:C8)) entered with Ctrl+Shift+Enter.
- Related functions: MINIFS, MAX, SUMIFS, AVERAGEIFS.

Author
Kyle Stott
Certified Microsoft Excel Expert
Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.