Index/Match Offset - Help Please

myith29

New Member
Joined
Apr 19, 2014
Messages
41
Hello,

I have a table similar to the one below. I created an index/match formula to find the row header for the highest value which works fine. However, in this case the max value repeats multiple times. For this table, I would need to create a second index/match formula that finds the next spot with the max value and return that row header instead. I figure that index/match is still the best formula but how can I tell Excel to look at the row number from the prior index/match results and start with an array after that?

My first formula is as follows: =index(a2:a6,match(e2,d2:d5,0),1)
The second formula needs to translate to: =index(a3:a6,match(e2,d3:d5,0),1)

Thank you,
[TABLE="width: 500"]
<tbody>[TR]
[TD]Letter[/TD]
[TD]Number[/TD]
[TD]Number 2[/TD]
[TD]Total[/TD]
[TD]Max Value[/TD]
[/TR]
[TR]
[TD]a[/TD]
[TD]3[/TD]
[TD]2[/TD]
[TD]5[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]c[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]d[/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]e[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Book1
ABCDEF
1LetterNumberNumber 2TotalMax ValueMatching Rows
2a3255a
3b224c
4c145
5d213
6e314
Sheet1
Cell Formulas
RangeFormula
D2=SUM($B2:$C2)
F2{=IFERROR(INDEX($A$2:$A$6,SMALL(IF($D$2:$D$6=$E$2,ROW($D$2:$D$6)-ROW($D$2)+1),ROWS($F$2:$F2))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.


WBD
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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