Return unique, distinct list in descending order, based on values in another column

mrblister

Board Regular
Joined
Nov 20, 2016
Messages
191
Office Version
  1. 2019
Platform
  1. Windows
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]NAME[/TD]
[TD]SCORE[/TD]
[TD]WANT THIS[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Cathy[/TD]
[TD]75[/TD]
[TD]Dan[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Bert[/TD]
[TD]50[/TD]
[TD]Cathy[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Cathy[/TD]
[TD]75[/TD]
[TD]Alan[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Bert[/TD]
[TD]50[/TD]
[TD]Bert[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Alan[/TD]
[TD]50[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Dan[/TD]
[TD]100[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Hello all. I'm looking for a formula for C2 (copied down). The formula returns a unique distinct list (removes duplicates), in descending order of the person's score.
Notes:
  • Column A contains names, which may or may not have multiple entries in the column. The names listed don't follow any order.
  • The Score in column B is associated to the name in column A, and is always the same. So for example, Alan's score is always 50 in column B (whenever Alan's name shows up in column A).
  • It's possible 2 or more people have the exact same score.
  • It's also OK if the returned list is Dan, Cathy, Bert, Alan (as Alan and Bert have the same score)

Thanks!
 

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
Try this in C2:

Code:
=IFERROR(INDEX($A$2:$A$10,MATCH(LARGE(IF($A$2:$A$10<>"",IF(COUNTIF($C$1:$C1,$A$2:$A$10)=0,$B$2:$B$10)),1),IF($A$2:$A$10<>"",IF(COUNTIF($C$1:$C1,$A$2:$A$10)=0,$B$2:$B$10)),0)),"")

Confirm with Control+Shift+Enter, not just enter.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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