简体   繁体   中英

How to use the formula RANK() on google sheet for each new date?

I do not know how to dynamically change the RANK formula based on the date.

For each day (or each new date) I have to rewrite the formula in order to match the range of the D-Day.

Date    Name    Points  Ranking Reward
27 Jul  Andy    3          3    6
27 Jul  Mike    14         2    8
27 Jul  Lucy    78         1    10
26 Jul  Andy    45         2    8
26 Jul  Mike    65         1    10
26 Jul  Lucy    12         3    6
25 Jul  Andy    123        3    6
25 Jul  Mike    23423      2    8
25 Jul  Lucy    466566     1    10

See the google sheet here: example

The datas are added dynamically each day so I would like it to be automatic. I am open to try some script as well if needed. Thank you:-)

PS: I also found this question: similar problem?

But I did not understand how the formula response works and I am not sure I can apply it to my problem here.

use in D1:

=ARRAYFORMULA({"Ranking"; IFERROR(1/(1/VLOOKUP(ROW(A2:A), {
 SORT(ROW(A2:A), A2:A, 0, C2:C, 0), 
 COUNTIFS(SORT(A2:A, 1, 0, C2:C, 0), SORT(A2:A, 1, 0, C2:C, 0), 
 ROW(A2:A), "<="&ROW(A2:A))}, 2, 0)))})

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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