RANK(number,ref,[order])
=RANK(A1,A1:A5,0)
The RANK() function returns the position of a number in a list of numbers, relative to the other values in the list. The example above will return 5 if the values 1-5 are in the range A1:A5 and the values are ranked in descending order by setting order to 0.
=RANK(A1,A1:A5,1)
The RANK() function will also return the position of a number in a list of numbers, relative to the other values in the list. This function will return 1 if the values 1-5 are in the range A1:A5 and the values are ranked in ascending order by setting order to 1.
The RANK function is a way of determining the relative size of a number compared to other numbers within a list by calculating the position a number would take in a sorted list.