MAXIFS Function
Finds the largest value where multiple conditions are all true.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| max_range | The range of cells from which the maximum is returned. | Required |
| criteria_range1 | The first range tested against criteria1; must be the same size as max_range. | Required |
| criteria1 | The condition for criteria_range1 (e.g. "Apple", ">100", "East"). | Required |
| criteria_range2, criteria2, ... | Optional additional range/criteria pairs; all must be met (AND logic). | Optional |
Basic Example
Largest sale for a specific product
=MAXIFS(C2:C10, A2:A10, "Apple")Among rows where column A is Apple, the largest value in column C (e.g. 950) is returned.
Advanced Examples
Example 1: Maximum with two criteria
Top sale in a region above a thresholdBoth conditions must be satisfied (AND logic).
=MAXIFS(C2:C100, A2:A100, "East", B2:B100, ">1000")Example 2: Criterion built from a cell reference
Reusable threshold in a cellConcatenate a comparison operator with a cell value.
=MAXIFS(C2:C50, A2:A50, "Banana", B2:B50, ">"&E1)How MAXIFS Works
MAXIFS evaluates each criteria_range against its criteria, keeping only the rows where all conditions are true. It then returns the maximum value from max_range at those rows. All ranges must have the same dimensions. If no row satisfies every criterion, MAXIFS returns 0. Criteria support operators (>, <, >=, <=, <>) and wildcards (*, ?) for text. It is the conditional counterpart of MAX, similar to how SUMIFS extends SUM.
Important Notes & Limitations
All ranges must be the same size; mismatched sizes cause #VALUE!.
Applies AND logic only; OR logic across criteria requires separate formulas combined with MAX.
Returns 0 when no row meets all criteria, which can be confused with a real zero.
Common Errors & Fixes
#VALUE! errorThe criteria ranges and max_range have different sizes or shapes.Fix: Ensure every range covers the same rows and columns.
Wrong maximum returnedCriteria text does not exactly match, including case differences or stray spaces.Fix: Use exact text, trim spaces, or use wildcards for partial matches.
Download Practice File
MAXIFS
maxifsPractice MAXIFS with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the MAXIFS function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps