google-sheetsexcel-formulagoogle-sheets-formulaarray-formulas

ranking formula start from negative number


How to make a ranking formula but starting from negative numbers and preventing double rankings

SCORE RANK
-50 1
-25 2
-20 3
-10 5
-20 4
-10 6
-1 7
0 8
3 10
1 9

here is the link : https://docs.google.com/spreadsheets/d/1OG7lCRVDu_BFVU2F8bPokAeX3iS61HlzuWkL1JwkVRM/edit?gid=0#gid=0

I tried the formula but it didn't work as I expected =RANK(A2,$A$2:$A)


Solution

  • You may try:

    =map(A2:A,lambda(Σ,if(Σ="",,rank(Σ,A:A,1)+let(Λ,countif(A2:Σ,Σ),if(Λ>1,Λ-1,)))))
    

    enter image description here