RANK returns the rank of a number in a list of numbers. @x is the number whose rank you want to find, @ref is the list of numbers, and @order specifies how to rank numbers. If @order is 0, numbers are ranked in descending order, otherwise numbers are ranked in ascending order.
This function is Excel compatible.