[英]Google Sheets : Group By one column and Rank by 2 columns
I have a table like below where I need to group by column A and determine rank/priority based on the logic below:我有一个如下表,我需要按 A 列分组并根据以下逻辑确定排名/优先级:
These are the steps I would like to do :这些是我想做的步骤:
Please see picture for sample data and expected output in column D请参阅图片以获取 D 列中的示例数据和预期输出
I have tried this function but it only gives me rank based on one column - https://infoinspired.com/google-docs/spreadsheet/rank-group-wise-in-google-sheets/我已经尝试过这个功能,但它只给我基于一列的排名 - https://infoinspired.com/google-docs/spreadsheet/rank-group-wise-in-google-sheets/
Also clarifying that Column D is what I would like to generate through the formula.还要澄清 D 列是我想通过公式生成的。 I was just showing that as expected output in the image.我只是在图像中显示了预期的输出。 We don't have that available and need to generate that rank from columns A, B and C!我们没有可用的,需要从 A、B 和 C 列生成该排名!
Any ideas/thoughts are appreciated!任何想法/想法表示赞赏! Thank you!谢谢!
Get rank by group按组获取排名
I understand that you want to determine the rank by group based on columns A, B and C.我了解您希望根据 A、B 和 C 列按组确定排名。
1 - First of all, we get the score from 0 to 100 to keep it readable, by creating a helper column shown in yellow, Paste the following formula in
E2
. 1 - 首先,我们通过创建一个黄色显示的辅助列,将分数从 0 到 100 以保持可读性,将以下公式粘贴到E2
中。
=ArrayFormula(IF(A2:A="",,(ArrayFormula(B2:B13*C2:C13)/MAX(ArrayFormula(B2:B13*C2:C13)))*100))
Explanation解释
1.a - Multiply the ranges B2:B13*C2:C13
Date*Impact in that way the greater the date and the greater the impact is the greater the output. 1.a - 将范围B2:B13*C2:C13
Date*Impact 相乘,日期越大,影响越大,输出越大。
ArrayFormula
allows for the usage of non-array functions with arrays and the ability to show values returned by an array formula over many rows and/or columns. ArrayFormula
允许将非数组函数与数组一起使用,并能够在许多行和/或列上显示数组公式返回的值。
1.b - Divide /
by MAX
of the output and multiply *
by 100 1.b - 除以/
除以输出的MAX
并将*
乘以 100
2 - Paste this formula in
F2
and drag down to get rank by group. 2 - 将此公式粘贴到F2
中并向下拖动以按组获得排名。
=Rank(E2,Filter($E$2:$E$13,$A$2:$A$13=A2),0)
Explanation ...解释...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.