Category: FUNCTION | Updated: 2026-11-22
How to Use the MAXIFS Function | Find the Maximum Value Matching Criteria
How to Use the MAXIFS Function
The MAXIFS function finds the maximum value among cells that meet one or more specified criteria. It is very useful for finding things like the highest sales in a specific department or the highest temperature in a specific month.
Syntax
=MAXIFS(range, criteria_range1, criterion1, [criteria_range2, criterion2, ...])
- range: The range of cells from which the maximum value will be determined (required).
- criteria_range1: The range of cells to evaluate against
criterion1(required). - criterion1: The condition to apply to
criteria_range1(required). - criteria_range2, criterion2, …: Additional ranges and their corresponding criteria (optional).
Example with a Table
Here is an example of finding the highest sales for the “Sales” department in “Tokyo” from sales data by department and area.
| Department | Area | Sales | Formula | Result |
|---|---|---|---|---|
| Sales | Tokyo | 500 | =MAXIFS(C2:C6, A2:A6, "Sales", B2:B6, "Tokyo") |
800 |
| Sales | Osaka | 950 | ||
| Development | Tokyo | 700 | ||
| Sales | Tokyo | 800 | ||
| Development | Osaka | 600 |
Common Errors and Notes
- #VALUE! Error: Occurs when the
rangeandcriteria_rangearguments do not have the same number of rows and columns (size). Always specify ranges of identical size. - No matching data: If no rows satisfy the criteria,
0is returned instead of an error. Be careful if you need to distinguish between an actual maximum value of0and no matching data.
Frequently Asked Questions
Q. Can I use comparison operators like "greater than or equal to" or "not equal to" in MAXIFS?
A. Yes, you can specify comparison operators by enclosing them in double quotes, such as ">=100" or "<>Tokyo".
Q. What happens if no data matches the criteria?
A. Instead of returning an error, it returns the number 0.