Highest and lowest that match with MAXIFS and MINIFS
1 / 5
We want each team's smallest sale in F2:F5. MINIFS finds it among the rows that match.
keyboard Typing formulas is easiest on a computer with a keyboard.
A1
| 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 |
team
sales
smallest sale
Type to enter a value or a formula starting with =. F2 edits, F4 adds $ to a reference.
How MAXIFS and MINIFS works
What do
MAXIFSandMINIFSdo?MAXIFSfinds the highest number among the rows that match;MINIFSfinds the lowest.=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.