Search code examples
google-sheetsgoogle-sheets-formulaspreadsheet

Ranking formula in Google Spreadsheet


I'm new to Google Spreadsheet and I have a problem with the ranking formula. Please help me to solve this problem

EXAM SCORE RANK NUMBERS
-2500 1
-400 2
-400 2
-1 3
0 4
1 5
2 6
2 6

I've tried using the formula =rank(A2 , $A$2:A , 1) but it doesn't work.
So here is the link https://docs.google.com/spreadsheets/d/164h2OpzOVWVf-8_zTRA4ws2p7tvxXSlAZSqkEZqf6ig/edit?gid=0#gid=0


Solution

  • Try the following formula-

    =XMATCH(A2,UNIQUE(SORT($A$2:$A$9)))
    

    Dynamic spill formula-

    =MAP(TOCOL(A2:A,1),LAMBDA(x,XMATCH(x,UNIQUE(SORT(TOCOL(A2:A,1))))))
    

    enter image description here