Highest and lowest that match with MAXIFS and MINIFS
Find each team's biggest or smallest sale.
MAXIFS and MINIFS find the highest or lowest value among the rows that match.
Find each team's smallest sale in F2:F5. Write one formula in F2 and copy it down.
Typing formulas is easiest on a computer with a keyboard.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Name | Team | Sales | Team | Smallest sale | ||
| 2 | Tariq | West | 50 | North | |||
| 3 | Nadia | West | 800 | South | |||
| 4 | Daniel | North | 290 | East | |||
| 5 | Quinn | South | 900 | West | |||
| 6 | Jamal | North | 680 | ||||
| 7 | Isla | East | 420 | ||||
| 8 | Kofi | West | 340 | ||||
| 9 | Yusuf | North | 640 | ||||
| 10 | Sam | South | 870 | ||||
| 11 | Rosa | West | 840 | ||||
| 12 | |||||||
| 13 | |||||||
| 14 | |||||||
| 15 |
How MAXIFS and MINIFS works
What do
MAXIFSandMINIFSdo?MAXIFSfinds the highest number among the rows that match;MINIFSfinds the lowest. Both are in Excel 2019 and later (older versions show #NAME?).=MAXIFS(max_range,criteria_range, criteria) Which part comes first?
The numbers to search come first, like
SUMIFS:=MAXIFS($C$2:$C$11,$B$2:$B$11,E2)is the best sale in column C among the rows whose team in column B matchesE2.Can I use more than one condition?
Yes. Add more pairs of a range and what it must match:
=MAXIFS(C2:C11,B2:B11,"North",D2:D11,"Online").What if nothing matches?
Both give 0, not an error. Check the condition if you see an unexpected 0.
Know someone fighting with a spreadsheet? Send them this page.