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
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.
Example 2. Largest apple quantity
=MAXIFS(C2:C9, B2:B9, "Apple")One condition is fine. Of 30, 20 and 25, the largest is 30.
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
Ranges of different sizes
max_range D2:D9 with a criteria range A2:A8 returns #VALUE!. Drag a range handle up to check.
Trusting a 0 result
If nothing matches, the result is 0, not an error, so it can't be told apart from a real 0. Check with COUNTIFS.
Opening it in Excel 2016
MAXIFS is in Office 2019 and later. Watch out when sharing files with Excel 2016 users.
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.