The MAXIFS Excel function is a statistics formula that returns the maximum value of only the cells that meet certain criteria. In this guide, we’re going to show you how to use the MAXIFS function and also go over some tips and error handling methods.
Supported Excel versions
- Excel 2016 and later
MAXIFS Function Syntax
Arguments
max_range |
The range of values to be used to determine the maximum. |
criteria_range1 |
The range of cells that you want to apply the criteria1 against. |
criteria1 |
The criteria that is to be applied to criteria_range1 to define which cells are going to be evaluated as the maximum. |
[criteria_range2, criteria2] |
Optional. Additional ranges and their associated criteria pairs. You can enter up to 126 range/criteria pairs. |
Examples
Note that we're using named ranges in our sample formulas to make them easier to read. This is not required.
Numeric condition
String criteria
Tips
- Use the same number of rows and columns for max range and criteria range arguments.
- Bad Example: =MAXIFS(G2:G15,F2:H10,">2014",J2:J20,"IT")
- Good Example: =MAXIFS(G2:G11,F2:F11,">2014",J2:J11,"IT")
- Comparison operators:
Operator |
Description |
Criteria Sample |
Criteria Meaning |
= |
Equal to |
“=10000” |
Equal to 10000 |
<> |
Not equal to |
“<>10000” |
Not equal to 10000 |
> |
Greater than |
“>10000” |
Greater than 10000 |
< |
Less than |
“>10000” |
Less than 10000 |
>= |
Greater than or equal to |
“>=10000” |
Greater than or equal to 10000 |
<= |
Less than or equal to |
“<=10000” |
Less than or equal to 10000 |
? |
Takes the place of a single character |
“Admin?” |
6-character word starts by “Admin” |
* |
Can take the place of any number of characters. |
“Admin*” |
Any number of character word starts with “Admin” |
~ |
Use tilde in front of a question mark or an asterisk to actually find them |
“Admin~*” |
Equal to "Admin*" |
Note: Wildcards cannot be used for numeric values. Searching a wild card in a range of numeric values will return no matches.
Issues
#VALUE!
- The MAXIFS function returns incorrect results when you use it to match strings that are longer than 255 characters or to the string #VALUE!.
- If shape of max_range and criteria_range aren't the same, MAXIFS returns the #VALUE! error.
TRUE and FALSE
TRUE and FALSE values in max_range are evaluated as numbers. While TRUE is evaluated as 1, FALSE is evaluated as 0. As a result this condition may cause unexpected results when evaluated as other values.