Find the Highest Value in a Category
You have amounts in one column and categories in another, and you need the highest amount for one specific category — the top Sales deal, the latest date per person, the max score per team.
Excel & Google Sheets
This formula works in both Excel and Google Sheets.
How it works
MAXIFS scans the amounts in column C but only considers rows where column A says Sales, then returns the largest of those. The range to maximize comes first, followed by pairs of criteria range and criteria — and you can add more pairs to narrow further, like MAXIFS(C:C,A:A,"Sales",B:B,"Ana Torres") for one person's best deal. Point the criteria at a cell instead of typing it — =MAXIFS(C:C,A:A,E2) — and the formula becomes a reusable lookup. It works in Google Sheets and Excel 2019 or newer; when nothing matches, it returns 0 rather than an error.
When to use it
Use this for the biggest deal per department, the top score per team, or the most recent date per employee (dates are numbers, so MAXIFS finds the latest one). Pair it with a list of categories to build a one-line leaderboard.
Common mistakes
Did this formula help?
Engine-verified against the sample data aboveLast reviewed 2026-07-08