MAXIFS Function

Excel Functions › Statistical

Excel 2019+ Statistical

The Excel MAXIFS function returns the largest number in a range that meets one or more conditions — a conditional MAX that needs no array formula.


Quick answer:
=MAXIFS(C2:C100, A2:A100, "East") highest sale in the East region

Syntax

=MAXIFS(max_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
ArgumentDescription
max_rangeRequiredThe range of cells to find the maximum from.
criteria_range1RequiredThe first range to test against criteria1. Must be the same size as max_range.
criteria1RequiredThe condition that defines which cells in max_range to consider. Can be a number, text, or expression like ">100" or "East".
criteria_range2, criteria2, ...OptionalUp to 126 additional range/criteria pairs. All conditions must be met (logical AND).

How to use it

MAXIFS scans max_range and returns the biggest value, but only across the rows where every criteria range matches its criterion. Each criteria_range must be exactly the same shape as max_range.

=MAXIFS(C2:C100, A2:A100, "East") // top East sale
=MAXIFS(C2:C100, A2:A100, "East", B2:B100, ">=2024") // East, 2024+

Comparison operators go inside the quotes (">100", "<=50", "<>0"), and you can splice in a cell reference with ">"&F1. Wildcards * and ? work for text criteria.

ABC
1RegionYearSale
2East20241200
3West20241800
4East20251500
5=MAXIFS(C2:C4,A2:A4,"East")→ 1500

No match? If no rows satisfy the criteria, MAXIFS returns 0 rather than an error — handy, but watch for it skewing results when 0 is also a valid maximum.

Try it: interactive demo

Live demo

Pick a MAXIFS example to see the formula and its result.

Result:

Practice workbook

📊
Download the free MAXIFS practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

What does MAXIFS return when nothing matches the criteria?
It returns 0, not an error. If your data could legitimately contain 0, test the match count first (e.g. with COUNTIFS) so you don't mistake "no match" for a real maximum of zero.
How is MAXIFS different from an array MAX formula?
Before Excel 2019 you needed an array-entered formula like =MAX(IF(A2:A100="East",C2:C100)) (Ctrl+Shift+Enter). MAXIFS does the same job natively, is easier to read, and supports multiple conditions.
Can MAXIFS use more than one condition?
Yes. Add extra criteria_range, criteria pairs (up to 126). All conditions must be true for a row to count — the logic is AND, not OR.
Why do I get a #VALUE! error?
Every criteria_range must be the same number of rows and columns as max_range. Mismatched range sizes are the most common cause of #VALUE! with MAXIFS.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: MINIFS · MAX · MIN · AVERAGEIFS · SUMIFS · COUNTIFS