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.
Syntax =MAXIFS(max_range, criteria_range1, criteria1, ...)
=MAXIFS(C2:C5,A2:A5,"Austin",B2:B5,"Electric")Arguments
| Name | Required | What to pass |
|---|---|---|
| max_range | Required | The numbers to compare. |
| criteria_range1 | Required | The first range to test, the same shape as max_range. |
| criteria1 | Required | The test. Text matches ignore case. |
| criteria_range2 | Optional | More pairs. Every test has to pass. |
Examples
The higher Austin Electric bill
=MAXIFS(C2:C5,A2:A5,"Austin",B2:B5,"Electric")Result $143.60
| A | B | C | |
|---|---|---|---|
| 1 | City | Category | Amount |
| 2 | Austin | Electric | 143.60 |
| 3 | Dallas | Electric | 110.00 |
| 4 | Austin | Gas | 96.20 |
| 5 | Austin | Electric | 118.45 |
| 6 | 143.60 |
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.