Retrieving the Five Best Maximum Unique Values

I run the Nerf League at a party and want my table to show the top five members.

Participants are allowed an unlimited number of applications, and only their best result is taken into account. Entries are collected on Google Sheets and Top 5 are published on the kiosk screen .

Here are some sample data:

  - ** Full Name, Score **
 - Test Test, 3
 - Test2 Test2,1
 - Test3 Test3.10
 - Test4 Test4,3
 - Test5 Test5.42
 - Test5 Test5,500
 - Test6 Test6.20 

Here is the formula I have so far (thanks to tigeravatar ):

=INDEX($A$2:$A$28,MATCH(1,INDEX(($B$2:$B$28=LARGE($B$2:$B$28,ROWS(I$1:I1)))*(COUNTIF(I$1:I1,$A$2:$A$28)=0),),0)) 

This formula shows all the maximum values ​​- if, for example, one person has 5 records that are higher than all, they will all be calculated.

In the "five" should be displayed only the record with the most points from five different participants.

What do I need to do to show only the top entry that each member provided?

+5
source share
2 answers

It seems that the formula proposed by @AdamL met the requirements:

 =QUERY(A2:B28,"select A, max(B) group by A order by max(B) desc limit 5 label max(B) ''",0) 
+5
source
 =QUERY(A2:B28,"select A, max(B) group by A order by max(B) desc limit 5 label max(B) ''",0) 

<= He works idle.

if you have a special character in the cells in column A, the output / result of the function is incorrect.

For instance,

if the value in A1 is HN_123_1 / 2, the output is incorrect. The special characters here are "_" and "/".

I hope for this help.

-1
source

Source: https://habr.com/ru/post/1205117/


All Articles