Index-match with a criteria

Jasesair

Active Member
Joined
Apr 8, 2015
Messages
282
Office Version
  1. 2016
I have columns with Names, Ages and Points in columns A-C. Based on the age, I'm able to return the highest points for each age. I'm having trouble then returning the name of that person with that highest points score in each age group.

Currently, I've tried:
=IF(MATCH(F$2,$B$3:$B$20),INDEX($A$3:$A$20,MATCH(F$3,$C$3:$C$20,0)))
but this doesn't work when there's another name with the same points, even if from a different age.

Any help would be very much appreciated.

Book3
ABCDEFGHIJ
1Ages
2NameAgePoints678910
3Brian756Highest Points9086658656
4Bill865NameRosieScottBillScottBrian
5Joe774
6Henry9642nd Highest56746078 
7Adam1056Name
8Scott786
9Parker846
10Kevin978
11Rosie690
12Sarah860
13Natalie765
14Alice986
15Kerry656
16John845
17Emma734
18Julie943
19Kate954
20Wayne768
Sheet1
Cell Formulas
RangeFormula
F3:J3F3=IFERROR(LARGE(IF($B$3:$B$20=F$2,$C$3:$C$20),1),"")
F4:J4F4=IF(MATCH(F$2,$B$3:$B$20),INDEX($A$3:$A$20,MATCH(F$3,$C$3:$C$20,0)))
F6:J6F6=IFERROR(LARGE(IF($B$3:$B$20=F$2,$C$3:$C$20),2),"")
Press CTRL+SHIFT+ENTER to enter array formulas.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
How about
+Fluff 1.xlsm
ABCDEFGHIJ
1Ages
2NameAgePoints678910
3Brian756Highest Points9086658656
4Bill865NameRosieScottBillAliceAdam
5Joe774
6Henry9642nd Highest56746078 
7Adam1056NameKerryJoeSarahKevin 
8Scott786
9Parker846
10Kevin978
11Rosie690
12Sarah860
13Natalie765
14Alice986
15Kerry656
16John845
17Emma734
18Julie943
19Kate954
20Wayne768
Master
Cell Formulas
RangeFormula
F3:J3F3=IFERROR(AGGREGATE(14,6,$C$3:$C$20/($B$3:$B$20=F$2),1),"")
F4:J4F4=IFERROR(INDEX($A$3:$A$20,AGGREGATE(15,6,(ROW($A$3:$A$20)-ROW($A$3)+1)/($B$3:$B$20=F2)/($C$3:$C$20=F3),1)),"")
F6:J6F6=IFERROR(AGGREGATE(14,6,$C$3:$C$20/($B$3:$B$20=F$2),2),"")
F7:J7F7=IFERROR(INDEX($A$3:$A$20,AGGREGATE(15,6,(ROW($A$3:$A$20)-ROW($A$3)+1)/($B$3:$B$20=F2)/($C$3:$C$20=F6),1)),"")
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,700
Messages
6,126,301
Members
449,308
Latest member
VerifiedBleachersAttendee

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