Home / Guides / MAXIFS and MINIFS in Excel

MAXIFS and MINIFS in Excel

Excel Functions · Updated June 2026

MAXIFS returns the largest value in a range that meets one or more criteria, and MINIFS returns the smallest. They mirror SUMIFS in argument order, with the value range first followed by criteria range and criteria pairs. Analysts use them to find the peak or trough of a metric within a segment without sorting or filtering the data.

Syntax and argument order

The signatures are =MAXIFS(max_range, criteria_range1, criteria1, ...) and =MINIFS(min_range, criteria_range1, criteria1, ...). The range you take the max or min of comes first, then each criteria range pairs with its criteria.

Every criteria range must be the same size as the value range. Multiple criteria pairs combine with AND logic, so a row must satisfy all conditions to count. Criteria use the same syntax as SUMIFS, including comparison text like ">=100" and cell references joined with &.

Worked example: highest sale in a region and quarter

Amounts sit in D2:D6, regions in B2:B6, and quarters in C2:C6. You want the largest West region sale in Q2.

  1. Enter =MAXIFS(D2:D6, B2:B6, "West", C2:C6, "Q2").
  2. Excel scans for rows where region is West and quarter is Q2.
  3. Two rows qualify, with amounts 12000 and 8000.
  4. MAXIFS returns the larger of those, which is 12000. Swapping to MINIFS would return 8000.
RegionQuarterAmount
WestQ212000
EastQ29000
WestQ28000
WestQ115000

Only West and Q2 rows count. The largest of 12000 and 8000 is 12000.

How analysts use MAXIFS and MINIFS

These functions answer best and worst questions inside a slice of data without restructuring the table.

Availability and the older-version alternative

MAXIFS and MINIFS arrived in Excel 2019 and are available in Excel 365. In Excel 2016 and earlier they do not exist, so a file that relies on them shows a #NAME? error when opened in an older version.

For older versions, use an array formula. To replicate the example, enter =MAX(IF((B2:B6="West")*(C2:C6="Q2"), D2:D6)) and confirm with Ctrl plus Shift plus Enter so it evaluates as an array. The product of the two comparison arrays acts as the AND, returning 1 where both match, and MAX takes the largest qualifying amount. Replace MAX with MIN for the minimum.

Do it in one click

Find Hardcodes

Find Hardcodes flags literal thresholds typed into MAXIFS criteria so limits live in assumption cells you can adjust.

Get ModelMint See how it works

FAQ

What versions of Excel have MAXIFS?

MAXIFS and MINIFS were introduced in Excel 2019 and are in Excel 365. They are not available in Excel 2016 or earlier, where you need an array formula with MAX or MIN and IF instead.

How is MAXIFS different from MAX?

MAX returns the largest value in a range with no conditions. MAXIFS returns the largest value only among rows that meet your criteria, so you can find a peak within a region, period, or category.

Why does MAXIFS return 0?

If no rows meet all the criteria, MAXIFS returns 0 rather than an error. Check your criteria spelling and that the criteria ranges line up with the value range when you get an unexpected zero.