简体   繁体   English

如何按日期创建排名人员的 Google Sheet 表并从列表中排名

[英]How to create a Google Sheet table of ranked person by date and rank from a list

I have a Google Sheet with daily ranked items expanding with new data everyday in the Raw Data Table A2:C.我有一个 Google 表格,每天在原始数据表 A2:C 中使用新数据扩展每日排名的项目。

I would like to generate a report matrix similar to table in E2:J using one formula so that we don't need to manually copy formulas in each cells in the report table from time to time.我想使用一个公式生成类似于 E2:J 中表格的报告矩阵,这样我们就不需要不时手动复制报告表格中每个单元格中的公式。

It would be ideal to have one formula at cell E2 (or E3, F1, F2) only that will automatically generate as many rows and columns in the report table based on the data in Raw Data Table.理想的情况是在单元格 E2(或 E3、F1、F2)中只包含一个公式,它会根据原始数据表中的数据自动在报告表中生成尽可能多的行和列。 This way, the report table will not needed to be maintained on a daily basis (like copying formula everyday as data expanded).这样,就不需要每天维护报表了(比如随着数据的扩展每天都复制公式)。

There are less elegant ways to do it like pre-copy formula into a large number of cells or using Google App Script to generate the table.有一些不太优雅的方法可以做到这一点,例如将公式预复制到大量单元格中或使用 Google App Script 生成表格。 However, I believe an advance query() or a complex formula mixing query(), filters() and/or arrayformula() can do the job!但是,我相信高级查询() 或混合查询()、过滤器() 和/或arrayformula() 的复杂公式可以完成这项工作! Just wonder if anyone of the Google Sheets query() expert can help!只是想知道是否有任何 Google 表格 query() 专家可以提供帮助!

在此处输入图像描述

try:尝试:

=QUERY(A2:C; "select A,max(C) where A is not null group by A pivot B"; 1)

Here's a possible solution:这是一个可能的解决方案:

=ArrayFormula(LAMBDA(dates,ranks,{A2,ranks;dates,IFNA(VLOOKUP(dates&ranks,{A3:A&B3:B,C3:C},2,0))})
(UNIQUE(A3:A),TRANSPOSE(UNIQUE(SORT(B3:B)))))

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM