Skip to content
Blog/Excel
Excel

How to Use MAXIFS and MINIFS in Excel

Use MAXIFS and MINIFS to find the largest or smallest value that meets one or more conditions in Excel, with finance examples and common fixes.

Do this with AI

Try Griddy free

Start in your browser. Also works with Excel and Google Sheets.

By Justin Freels//5 min read

MAXIFS and MINIFS return the largest or smallest value that meets one or more conditions. Use them when you need the highest invoice for a client, the smallest expense in a category, or the largest forecast variance for a department.

They are cleaner than combining MAX, MIN, and IF logic manually, especially in operating sheets with categories, owners, months, or statuses.

The syntax

fx
=MAXIFS(max_range, criteria_range1, criteria1, [criteria_range2], [criteria2], ...)
fx
=MINIFS(min_range, criteria_range1, criteria1, [criteria_range2], [criteria2], ...)
  • max_range / min_range — the values to evaluate
  • criteria_range1 — the first range to check
  • criteria1 — the first condition
  • [criteria_range2], [criteria2] — optional additional conditions

Step 1. Find the largest expense in one category

Suppose column A contains categories and column B contains amounts. To find the largest software expense:

fx
=MAXIFS(B2:B100, A2:A100, "Software")

To find the smallest software expense:

fx
=MINIFS(B2:B100, A2:A100, "Software")

This is useful in an expense tracker when one category looks high and you need to find the biggest individual row.

Step 2. Add a status condition

If column C contains approval status, find the largest approved travel expense:

fx
=MAXIFS(B2:B100, A2:A100, "Travel", C2:C100, "Approved")

MAXIFS checks every condition before choosing the maximum value.

Step 3. Find the worst budget variance

If column A contains departments, column B contains month names, and column C contains variance, find the largest May variance for Sales:

fx
=MAXIFS(C2:C100, A2:A100, "Sales", B2:B100, "May")

For a small business budget, this helps surface the biggest pressure point without manually sorting every budget row.

TIP

Use MAXIFS for the largest positive variance and MINIFS for the largest negative variance when your sheet uses signed variance values.

Step 4. Use cell references for reusable summaries

If E2 contains the department and F2 contains the month:

fx
=MAXIFS(C2:C100, A2:A100, E2, B2:B100, F2)

Now the formula can be copied across a summary table without rewriting the criteria each time.

Common mistakes

MistakeWhat happensFix
Criteria ranges are different sizes#VALUE!Keep every range the same height and width
Using text month names inconsistentlyNo matchUse real dates or standardized labels
Expecting the row label backOnly the value returnsPair with XLOOKUP or FILTER to return the row
Older Excel version#NAME?Use array formulas or AGGREGATE in older workbooks

The Griddy way

MAXIFS and MINIFS are good at finding the value, but the next question is usually which row caused it and why it changed.

"Find the largest negative budget variance for May, return the line item, and flag whether it is payroll, software, or marketing"

Griddy writes the criteria formula, pulls the matching row context, and turns the result into a reviewable budget exception.

Return the row behind the result

MAXIFS and MINIFS return a number, not the record that produced it. If a reviewer needs the invoice, owner, or date behind the number, use the result as a second lookup condition. For example, calculate the largest amount for a client, then use XLOOKUP or FILTER to return rows matching that amount and the same client. This matters when duplicate amounts are possible: a single lookup may return only the first row, while FILTER can show every tie for review.

Before trusting the result, verify that all criteria ranges have the same height as the max or min range. Also decide how blanks and zeros should be treated. A zero may be a real measured value, while a blank may mean the source was not supplied. Document that choice next to the summary so the number is not mistaken for a complete ranking.

Sources

Do this with AI

Turn the instructions into a finished spreadsheet.

Tell Griddy what you need in plain English, then inspect and keep editing the result in the browser, Excel, or Google Sheets.

Try Griddy freeStart in your browser. No download required.
Also works withExcel Google Sheets

Use this on real templates

Find the biggest budget exceptions faster

MAXIFS and MINIFS help surface the largest or smallest matching value in budget and expense sheets so review can focus on the rows that changed the plan.

Finance