Excel function

MAXIFSfunction

Returns the largest value among rows that meet every condition.

Excel 2019+
=MAXIFS(D2:D9, A2:A9, "Seoul", C2:C9, ">=10")
Range to drag
A
B
C
D
1
2
3
4
5
6
7
8
9

Drag the corner dots to change max_range, criteria_range1, criteria_range2. Click a cell in the criteria range to use its value as the criteria. Change criteria1 to a branch that does not exist, such as "Jeju". Nothing matches, so the result is 0. Try breaking it on purpose to see the errors.

Result

96000

max_range
D2:D9Drag a corner dot up/down to resize, sideways to change the column

The column to find the largest value in.

criteria_range1
A2:A9

The column checked against the first condition.

criteria1

The first condition.

criteria_range2
C2:C9

The column checked against the second condition.

criteria2

The second condition.

What is the MAXIFS function?

=MAXIFS(max_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)

MAXIFS returns the largest value among rows that meet every condition, such as the top sales in the Seoul branch.

It compares the matching values one by one and remembers the largest so far. One condition is enough.

MAXIFS is available in Office 2019 and later and in Microsoft 365. It is not in Excel 2016.

Arguments

max_range
The cells to find the largest value in. The first argument.
criteria_range1, criteria1
The range for the first condition and the condition.
criteria_range2, criteria2, ...
Optional. Every criteria range must be the same size as max_range, or you get #VALUE!.

MAXIFS examples

  1. Example 1. Top Seoul sales with a quantity of 10 or more

    =MAXIFS(D2:D9, A2:A9, "Seoul", C2:C9, ">=10")

    The bread row with quantity 8 is left out; the larger of 45000 and 96000 is 96000. This is how the sheet first opens.

  2. Example 2. Largest apple quantity

    =MAXIFS(C2:C9, B2:B9, "Apple")

    One condition is fine. Of 30, 20 and 25, the largest is 30.

  3. Example 3. No match

    =MAXIFS(D2:D9, A2:A9, "Jeju")

    There is no Jeju branch, so the result is 0. If nothing matches, the result is 0, not an error, so it can't be told apart from a real 0. Check with COUNTIFS.

Common mistakes

FAQ

Is there a MAXIF?
No. Use MAXIFS even with one condition.
Cells that are not numbers?
They are left out of the comparison.
Smallest value?
Use MINIFS the same way.