Contact

MAXIFS in Excel: Find the Largest Value That Meets Several Conditions

Statistical Intermediate Microsoft Excel

Build conditional maxima with Excel MAXIFS, align ranges, separate no matches from zero and use auditable threshold criteria.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: MAXIFS returns the largest value among positions that satisfy all supplied conditions. =MAXIFS(D2:D9,B2:B9,"East",C2:C9,"Open") finds the largest amount for East records marked Open.

Availability and version history

  • Introduced: Announced February 23, 2016, for Office 365; the first numeric build is not established. Microsoft announcement.
  • Availability: official help lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019.
  • Checked: October 14, 2026; official MAXIFS reference. Examples are independently calculated expectations, not native Excel test results.

Syntax and range requirements

=MAXIFS(max_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)

The value range and first condition pair are required. Additional pairs narrow the selection; Microsoft permits up to 126 pairs. Every condition range must match the value range in size and shape, or the function returns #VALUE!. The criteria have the same forms used by SUMIFS and related conditional functions. Official MAXIFS reference

MAXIFS returns a value, not the entire winning record. Multiple records can share the largest amount. A separate lookup needs a deliberate tie policy if you want one record’s identifier.

Prepare the fictional order data

Enter this table in A1:D9, with headings in row 1 and numeric amounts in D2:D9:

A: Order B: Region C: Status D: Amount
P01 East Open 120
P02 West Open 80
P03 East Closed 200
P04 East Open 150
P05 West Closed 60
P06 East Open 0
P07 North Open 90
P08 East Open 150

Keep formulas outside A1:D9. All examples below use the eight complete data rows, excluding the headings.

Example 1: one condition versus two

=MAXIFS(D2:D9,B2:B9,"East")
=MAXIFS(D2:D9,B2:B9,"East",C2:C9,"Open")

Expected results: 200 and 150. The first includes P03, whose amount is 200. The second excludes it because its status is Closed. P04 and P08 both attain the resulting maximum of 150.

Additional criteria are combined as AND conditions. Writing East in one pair and West in another pair on the same region range does not mean East OR West; no single region cell can equal both.

Example 2: build a comparison from a cell

Put 100 in F2. To find the largest East Open amount below that threshold:

=MAXIFS(D2:D9,B2:B9,"East",C2:C9,"Open",D2:D9,"<"&F2)

Expected result: 0, coming from P06. Here zero is a genuine selected amount. The expression "<"&F2 constructs a criterion from an operator and the cell’s current value; "<F2" would not substitute the number stored in F2.

Change F2 to 151. Expected result becomes 150. This comparison includes 150 because it is less than 151. Document whether a threshold is strict or inclusive before choosing < or <=.

Example 3: no matches also returns zero

=MAXIFS(D2:D9,B2:B9,"South")

Expected result: 0, although the table contains no South rows. Microsoft explicitly documents the no-match zero result. It is not an error, so IFERROR alone will not distinguish it from a genuine maximum of zero.

For this dataset, use a corresponding count:

=IF(COUNTIFS(B2:B9,"South")=0,"No matching rows",MAXIFS(D2:D9,B2:B9,"South"))

Expected result: No matching rows. COUNTIFS checks the same condition before the maximum is interpreted. In a real table, separately validate numeric amounts; a matching-row count alone does not prove every amount is usable.

Advanced example: make a small region summary

Put East, West, North, South in F5:F8. In G5 enter and fill down:

=MAXIFS($D$2:$D$9,$B$2:$B$9,F5,$C$2:$C$9,"Open")

Expected G5:G8: 150, 80, 90, 0. The dollar signs fix the source ranges while F5 advances. Label or flag the South no-match result using the count pattern above if a displayed zero could mislead readers.

The formula always examines the specified range. Filtering the visible table is not itself an extra criterion in this expression; encode the needed inclusion rule explicitly.

Advanced example: audit positional pairing

Microsoft documents that ranges may start on different worksheet rows yet still be accepted if their dimensions match. Their corresponding positions are paired, rather than being joined by absolute row number.

For three values 10, 20, 30 in J2:J4 and condition labels Keep, Drop, Keep in K3:K5:

=MAXIFS(J2:J4,K3:K5,"Keep")

Expected result: 30. The first and third positions match, selecting 10 and 30. This legal but shifted arrangement is often an accidental data-alignment bug. In ordinary record tables, align starting and ending rows as well as checking equal dimensions.

Practical limits and compatibility

A blank cell used as a criterion is documented as zero, which may unintentionally select zero-valued criteria cells. Validate editable criteria rather than assuming an empty parameter means ignore this condition.

MAXIFS was announced for Office 365 in 2016, while the current perpetual-version list begins at Excel 2019. Do not confuse that announcement date with a promise for every perpetual Excel 2016 installation. Preserve the criteria and source data when sharing a calculated report so the selected records can be audited.

Verification: Fictional inputs and independently calculated outputs; no native Excel execution. See the editorial testing standards.