提取前五个最大唯一值 [英] Extracting the top five maximum unique values

查看:94
本文介绍了提取前五个最大唯一值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行在聚会上的Nerf联赛,并希望我的电子表格来显示排名前五位的选手。



参赛者允许无限的条目,只有他们的最高分是计。条目被收集在 Google电子表格并在亭屏幕

以下是一些示例数据




  • 全名,得分

  • 测试测试3

  • Test2 Test2,1

  • Test3 Test3,10
  • Test5 Test5,500
  • $
  • Test6 Test6,20



这是我迄今为止的公式(感谢tigeravatar

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

此公式显示所有的最大值 - 例如,如果一个人有5个条目比其他人高,那么他们将全部被计入。



前五名必须只显示来自五位不同参赛者的最多分数的参赛作品。



我只需要显示每个参赛者提供的顶级参赛项目,我需要做些什么?

解决方案

似乎@AdamL提供的公式符合要求:

  = QUERY(A2:B28 ,选择A,max(B)group by A by max(B)desc limit 5 label max(B)'',0)


I am running a Nerf league at a party and want my spreadsheet to show the top five contestants.

Contestants are allowed unlimited entries and only their top score is counted. Entries are being collected on google spreadsheets and The Top 5 published on a kiosk screen

Here is 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 (with 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 maximum values - if, for example, one person has 5 entries that are higher than everyone else, they will all be counted.

The "top five" must show only the entry with the most points from five different contestants.

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

解决方案

Seems that the formula offered 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)

这篇关于提取前五个最大唯一值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆