RANK compares the number argument against every value in the ref range and returns its position. With order 0 (descending), the largest value gets rank 1. With order 1 (ascending), the smallest value gets rank 1. When two values are equal, both receive the same rank -- the lower of the two positions they would occupy -- and the next rank is skipped. If two values tie for positions 3 and 4, both receive rank 3 and no value receives rank 4. This means the total count of ranks used equals the total count of values, but individual rank numbers may not be sequential. The ref range must be locked with $ signs: =RANK(B2,$B$2:$B$11,0). Without the $ signs, the range shifts as the formula copies down and ranks become wrong. RANK.EQ (Excel 2010+) is identical to RANK. RANK.AVG gives tied values the average of the ranks they would occupy. For unique sequential ranks, add
COUNTIF($B$2:B2,B2)-1 to the RANK result -- this adds an offset based on how many times the value has already appeared.