I stopped using the Excel filter button to find high and low values. These 2 functions do it better

Configurare noua (How To)

Situatie

Excel’s filter button is useful, but I’ve realized I was relying on it for the wrong job. When all I wanted was the highest or lowest number that matched a certain condition, filtering meant hiding rows, sorting data, and then resetting everything afterward. But two functions I recently stumbled across have given me a much cleaner way to get those answers.

Solutie

MAXIFS and MINIFS aren’t just two more functions to add to your Excel toolbox. Since I learned about them, I’ve genuinely used them in several spreadsheets, and they’ve quietly become my go-to whenever I need to find the highest or lowest value that meets certain conditions.

There’s good reason for that. The old way of doing this is usually pretty simple: filter your data until you’ve got the records you want, sort the relevant column, and grab the number at the top or bottom. It works, but you’re changing your view of the dataset just to answer a single question. If all I want is an answer, why rearrange my data to get it?

MAXIFS and MINIFS leave everything where it is and return the answer in a cell. That means the result can sit in a summary table or dashboard, feed another formula, or power an Excel chart, while the underlying dataset remains fully visible.

The formulas also update when the source data changes. If you add a new record, or an existing value changes, Excel recalculates the result without you having to remember which filters you applied or sort the data again.

And then there’s the biggest advantage: multiple criteria. You can ask Excel to find the highest or lowest value where several conditions are true at the same time. Instead of filtering one column, then another, and finally sorting what’s left, you can describe the question in a single formula.

MAXIFS finds the highest value that meets your criteria

The syntax tells you almost everything you need to know

Excel cell A1 shows the MAXIFS formula typed with its function argument tooltip visible.

The beauty of MAXIFS and its partner-in-crime is that their syntax makes them really easy to learn.

The syntax for MAXIFS is:

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

In plain English, that means: find the highest value in one range, but only include values where the corresponding cells meet the specified criteria.

So, for example, here’s a table of computer specifications.

Excel table displays laptop specifications including Manufacturer, Model, Price, RAM, Storage, and Processor columns.

Let’s say I’m shopping for a new computer, and I’ve decided I don’t want to spend more than $1,500. Before I start comparing individual models, I want to know how much RAM I can expect to get for that budget. I could filter the Price column to show computers costing $1,500 or less, sort the RAM column from largest to smallest, and read the first result. I prefer to ask MAXIFS directly:

=MAXIFS(tblComputers[RAM], tblComputers[Price], "<=1500")

Excel spreadsheet showing laptop specs and cell H2 with a MAXIFS formula started below a Max RAM under 1500 header.
Excel spreadsheet showing cell H2 with MAXIFS referencing the selected RAM column.
In Excel, cell H2 shows a MAXIFS formula selecting the Price column as the criteria range.
excel-maxifs-completed-formula-criteria-less-than-equal-to-1500
Excel cell H2 shows the calculated result 32 from the evaluated MAXIFS formula.

Here’s what’s happening:

  • tblComputers[RAM] is the max_range—the column containing the numbers I want Excel to find the maximum from.
  • tblComputers[Price] is the criteria_range. That’s the column Excel checks to decide which rows qualify.
  • “<=1500” is the criteria. It tells Excel that the corresponding price must be less than or equal to $1,500.

The result is 32GB, giving me a quick idea of the highest amount of RAM available within my budget. I can then use that as a starting point when I begin comparing individual computers.

And the two ranges don’t have to be different. If I wanted to find the largest number in A2:A100 that was itself greater than 50, for example, I could use:

=MAXIFS(A2:A100, A2:A100, ">50")

The key thing to remember is that max_range tells Excel where to get the answer, while criteria_range and criteria tell it which values to consider.

Things get interesting when you add another condition

Excel cell H2 shows 16 as the calculated max RAM for Dell computers under 1500 dollars.

The real appeal of MAXIFS becomes clear when one condition isn’t enough. For example, what if I want to know how much RAM I can get from a Dell computer costing $1,500 or less?

I can simply add another criteria_range–criteria pair:

=MAXIFS(tblComputers[RAM], tblComputers[Price], "<=1500", tblComputers[Manufacturer], "Dell")

Now Excel has two conditions to check. The price must be $1,500 or less, and the manufacturer must be Dell. This is where MAXIFS starts to replace the filter button in a much more meaningful way. I don’t have to filter one column, then another, and finally sort whatever remains. I can describe the question directly in the formula.

I can keep adding criteria, too. For example, I could find the maximum RAM in a Dell computer costing $1,500 or less that also has at least 512GB of storage:

=MAXIFS(tblComputers[RAM], tblComputers[Price], "<=1500", tblComputers[Manufacturer], "Dell", tblComputers[Storage], ">=512")

The formula now has three criteria_range–criteria pairs. Excel only considers a row if all three conditions are satisfied, then returns the largest RAM value among those rows.

MINIFS finds the lowest value that meets your criteria

The same idea works when you’re looking for the smallest number

Excel cell A1 shows the MINIFS formula typed with its function argument tooltip visible.

If MAXIFS finds the highest value that meets your criteria, MINIFS finds the lowest. Its syntax is similarly easy to get your head around:

MINIFS(min_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)

This time, I have a table of race results. I want to find the fastest recorded 5K time for runners aged 40–49.

Excel table displays race results with Runner, Event, Age Group, Gender, Time, and Location columns.

Because a faster race time is a smaller number, MINIFS is exactly what I need:

=MINIFS(tblRaces[Time], tblRaces[Event], "5K", tblRaces[Age Group], "40-49")

Here, tblRaces[Time] is the min_range, while the Event and Age Group columns provide the two criteria pairs. Excel looks only at 5K results for the 40–49 age group, then returns the shortest time.

Excel cell H2 displays 0:21:48 as the fastest 5K race time for the 40-49 age group.

And, just as with MAXIFS, I can add more criteria_range–criteria pairs if I need them. For example, I could also restrict the results to a particular gender or location.

Making the criteria changeable

Tip solutie

Permanent

Voteaza

(0 din 0 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?