Index and match stop at first answer resulting in duplicate values

Burlgirl

New Member
Joined
May 19, 2023
Messages
3
Office Version
  1. 2019
Platform
  1. Windows
I have seen this question on the forum in the past, but every time I try to duplicate the answer - it doesn't seem to work for me...

In my first query, I am using =Small to gather the 10 lowest scores from a disc golf league. The =Small works fine. From there, I am using =index and =match to get the names of the people with the 10 lowest scores. It works, but when there are more than 1 person with the same score, the match returns only the first persons name in the list.

I've seen reference to =aggregate, but I cant seem to comprehend how that works, so every time I try to use it I have an error in my formula. I also have company controls on my computer which prevented me from installing the add-in XL2BB. So here I am... :)

This is the small formula which works fine: =SMALL(Scores!$D$4:$D$99,ROWS(Scores!D$4:D4))
This is the formula for first name and works fine until there is a duplicate score: =INDEX(Scores!$A$4:$A$99,MATCH(C2,Scores!$D$4:$D$99,0),0)
Last Name: =INDEX(Scores!$B$4:$B$99,MATCH(C2,Scores!$D$4:$D$99,0),0)

Cell Formulas
RangeFormula
A2:A11A2=INDEX(Scores!$A$4:$A$99,MATCH(C2,Scores!$D$4:$D$99,0),0)
B2:B11B2=INDEX(Scores!$B$4:$B$99,MATCH(C2,Scores!$D$4:$D$99,0),0)
C2:C11C2=SMALL(Scores!$D$4:$D$99,ROWS(Scores!D$4:D4))
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi & welcome to MrExcel.
How about
Excel Formula:
=INDEX(Scores!$A$4:$A$99,AGGREGATE(15,6,(ROW(Scores!$D$4:$D$99)-ROW(Scores!$D$4)+1)/(Scores!$D$4:$D$99=C2),COUNTIFS(C$2:C2,C2)))
 
Upvote 0
Solution
Wow! That worked perfectly - but when I copy it over to column B to retrieve the last name - and change "=INDEX(Scores!$A$4:$A$99" to "Scores!$B$4:$B$99" it doesn't work. I don't understand the aggregate thing. What does the 15,6 mean? Is that where the problem is?
 
Upvote 0
Make sure the countifs is still looking at col C
 
Upvote 0
Nevermind - I figured it out. The problem was not with the Agregate it was at the end of the formula in the COUNTIF argument. I updated it to be cell C2 (it changed to D2 when I copied it.

THANK YOU FOR YOUR HELP!!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

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