How can I create a "MaxIF" formula?

d0rian

Active Member
Joined
May 30, 2015
Messages
313
Office Version
  1. 365
Should be simple, but I'm banging my head against the wall. If I have the below data in cells A1:B9, how do I pull the max B-column value for each A-column category. E.g. I want to ask "Considering ONLY the rows with JAN in the A-column, what's the max value in the B-column?" (So formula would return: 30 for Jan, 5 for Feb, 27 for Mar, and 8 for Apr)

Jan 1
Jan 8
Feb 5
Mar 13
Jan 7
Mar 27
Feb 1
Apr 8
Jan 30
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
1) use a pivot table, set to show top n, with n=1

2) formula of the form:

max(if(range=value,number_range))

so something like:

max(if(a1:a9="Jan",b1:b9))
...entered with control + shift + enter, not just enter.
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,988
Members
448,538
Latest member
alex78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top