FormulaCraft

How to find the maximum with a condition in Excel and Google Sheets

Excel & Google Sheets
=MAXIFS(B2:B6,A2:A6,"North")

Verified example

Computed by a real spreadsheet engine on the sample data below.

RegionSales
North4200
South3100
North5800
West2700
North4900

=MAXIFS(B2:B6,A2:A6,"North")5800

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Type =MAXIFS( in your result cell.
  2. 2Select the range to find the maximum in, e.g. B2:B6.
  3. 3Add a comma, then select the criteria range, e.g. A2:A6.
  4. 4Add a comma, then enter the criterion in quotes, e.g. "North".
  5. 5Close the parenthesis and press Enter.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

What does MAXIFS return if no cells match?

It returns 0 when no cells in the criteria range match the condition.

Can I use wildcards in MAXIFS criteria?

Yes — use * for any sequence of characters and ? for a single character, e.g. "No*" matches "North" and "Northeast".

Formulas used

Related tasks

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: