INDEX MATCH MAX formula

willow1985

Well-known Member
Joined
Jul 24, 2019
Messages
888
Office Version
  1. 365
Platform
  1. Windows
I need help with a formula to help me match column C with A, find the max value in column B and return that value.

The formula would be in column D (see below image). These are the results I am hoping to get. Unfortunately there are letters mixed in with numbers so I am unsure how to get around this.

Thank you to anyone who can help.

1580158292782.png
 
I know that you can return a max value with the match portion of an index match

=INDEX(B2:B500,MATCH(MAX(C2:C500),A2:A500,0))

But I was curious about the reverse and returning the MAX value of the index.

=INDEX(MAX(B2:B500),MATCH(C2,A2:A500,0)) **I know this is not a valid formula. Trying to explain my thought process a bit better...
 
Upvote 0

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
I get a #VALUE error.
Try this

{=INDEX($B$2:$B$500,MATCH(C2&"|"&MAX(IF($B$2:$B$500<>"",($A$2:$A$500=C2)*(IF(ISNUMBER($B$2:$B$500),$B$2:$B$500,CODE(LEFT($B$2:$B$500)))))),$A$2:$A$500&"|"&IF($A$2:$A$500<>"",IF(ISNUMBER($B$2:$B$500),$B$2:$B$500,CODE(LEFT($B$2:$B$500)))),0))}
 
Upvote 0
As usual DanteAmor, thank you so much. This works perfectly:

=INDEX($B$2:$B$500,MATCH(C2&"|"&MAX(IF($B$2:$B$500<>"",($A$2:$A$500=C2)*(IF(ISNUMBER($B$2:$B$500),$B$2:$B$500,CODE(LEFT($B$2:$B$500)))))),$A$2:$A$500&"|"&IF($A$2:$A$500<>"",IF(ISNUMBER($B$2:$B$500),$B$2:$B$500,CODE(LEFT($B$2:$B$500)))),0))}

And thanks to the rest of you for all of your help as well, I appreciate all of your time.

Take care ?
 
Upvote 0
with Power Query
View attachment 5021
Code:
// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Group = Table.Group(Source, {"Column1"}, {{"Max", each List.Max([Column2]), type anynonnull}})
in
    Group

Hi Sandy, I was looking to do this without a code or table. Just a formula to get me a quick result.
But thank you very much!
 
Upvote 0
If you set up your data in Excel defined tables (Insert/Table; I'm not going to presume how much you already understand about that) then you shouldn't have to worry about more or less data, and I expect that Dante's formula (and maybe Snakechips' as well) would work fine with however much or little data was there, and without having to rewrite the formula to accommodate changes in the number of data rows.
 
Upvote 0

Forum statistics

Threads
1,215,187
Messages
6,123,540
Members
449,107
Latest member
caya

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