Google 表格 - 按项目按日期组划分的行排名



原始数据

fruit    date
orange   01/01/2016
mango    02/02/2015
apple    03/03/2017
mango    02/02/2014
apple    03/03/2018
orange   01/01/2017
orange   01/01/2015

我想按水果对它们进行分组,并按日期排列它们的排名顺序

结果会像

fruit    date          rank
orange   01/01/2016      2
mango    02/02/2015      2
apple    03/03/2017      1
mango    02/02/2014      1
apple    03/03/2018      2
orange   01/01/2017      3
orange   01/01/2015      1

如果fruit在 A1 中,请尝试使用 C2 并复制以适应:

=countifs(A$2:A,A2,B$2:B,"<"&B2)+countifs(A$2:A2,A2,B$2:B2,B2)

{感谢您选择明确的日期。

最新更新