Function · Statistical

Excel MAXIFS function

The Excel MAXIFS function returns the largest number whose row passes every test. The larger Austin Electric bill is $143.60. No match returns 0.

Excel 2019, Excel 2021, Excel 2024, Microsoft 365, and Excel for the web. Also in Google Sheets. Excel 2016 does not have it.

Syntax =MAXIFS(max_range, criteria_range1, criteria1, ...)

MAXIFS
=MAXIFS(C2:C5,A2:A5,"Austin",B2:B5,"Electric")

Arguments

NameRequiredWhat to pass
max_rangeRequiredThe numbers to compare.
criteria_range1RequiredThe first range to test, the same shape as max_range.
criteria1RequiredThe test. Text matches ignore case.
criteria_range2OptionalMore pairs. Every test has to pass.

Examples

The higher Austin Electric bill

=MAXIFS(C2:C5,A2:A5,"Austin",B2:B5,"Electric")

Result $143.60

=MAXIFS(C2:C5,A2:A5,"Austin",B2:B5,"Electric")C6
Utilities
ABC
1CityCategoryAmount
2AustinElectric143.60
3DallasElectric110.00
4AustinGas96.20
5AustinElectric118.45
6143.60
A picture of the sheet, not a live calculator. No matching row returns 0.

MAXIFS returns the largest number among rows that pass every test. Of the two Austin Electric bills, $143.60 and $118.45, the larger is $143.60. The arguments follow SUMIFS: the numbers first, then pairs of ranges and tests. Text tests ignore case.

An empty match returns 0. That is the sharp edge next to MAX of a range that has no numbers, which also returns 0, and next to AVERAGEIFS, which returns #DIV/0!. A high bill stored as text is ignored, and the function will not tell you. Excel 2016 does not have MAXIFS.