How to use the RANK.EQ function
What is the RANK.EQ function?
The RANK.EQ function calculates the rank of a number in a list of numbers, based on its position if the list were sorted. The top rank is returned if more than one number share the same rank.
The RANK.EQ and RANK.AVG function replaces the RANK function.
What is ranking a number?
Ranking a number means determining its position or order when arranged with other numbers in a dataset. The rank provides information about where a value stands relative to others.
For example, ten students had the following test scores: 66, 97, 99, 77, 9, 60, 35, 60, 61, and 57
If we sort the numbers from largest to smallest we get: 99, 97, 77, 66, 61, 60, 60, 35, 9 We can now rank the numbers based on size which I have done in cells D3:D11, however, the RANK.EQ function does not rank numbers like the image demonstrates above. Example 3 below shows how to return unique ranks.
When is it useful in statistics to rank a number?
One example is finding out the standing of an exam score in comparison to all students. Determining the rank is needed to find out the standing relative to the other students.
Another examples is that outliers are often ranked at the extremes.
What are outliers?
Outliers in statistics are observations that differ significantly from other observations in a dataset. They are data points that stand apart from the overall pattern.
What are the differences between RANK.AVG and the RANK.EQ functions?
The RANK.AVG function returns the average rank if more than one item share the same rank, the RANK.EQ function returns the top rank if more than one item share the same rank.
RANK.EQ function Syntax
RANK.EQ(number,ref,[order])
RANK.EQ function Arguments
number | Required. |
ref | Required. A list of numbers. |
[order] | Optional. This argument determines how the RANK.EQ function ranks a number.
0 (zero) - Default value, list in argument ref is sorted in a descending order. 1 - List in argument ref is sorted in an ascending order. |
What is descending order?
Descending order refers to arranging values or data points from highest to lowest. For example, sorting numbers in descending order: 12, 10, 8, 6, 4, 2
What is ascending order?
Ascending order refers to arranging values from lowest to highest. For example, sorting numbers in ascending order: 2, 4, 6, 8, 10, 12
RANK.EQ function example 1
Formula in cell C7:
The image below shows the position of number 10 if the list were sorted in an descending order.
This list sorted in a descending order shows number 10 in position 6 which is the rank the RANK.EQ function calculates in cell F2 in the top image. Note that the last duplicate (10) also gets rank 6 and not 7.
RANK.EQ function example 2
RANK.EQ function ignores non-numeric values in ref argument.
The RANK.EQ function calculates the same rank to duplicate identical numbers, however, it also moves the ranks for the following numbers. This example calculates ranks based on a list sorted in an ascending order.
Formula in cell C3:
10 has a duplicate number, both numbers get the same rank. The following number is 21, that number gets rank 3. No number has rank 2.
RANK.EQ function - how to return unique ranks
If you want the to give duplicate numbers a unique rank use the following formula:
Explaining formula
Step 1 - Calculate rank
RANK.EQ(number,ref,[order])
RANK.EQ(B3,$B$3:$B$9,1)
1 -Numbers are ranked in an ascending order.
Step 2 - Calculate count
The COUNTIF function calculates the number of cells that is equal to a condition.
Function syntax: COUNTIF(range, criteria)
COUNTIF($B$3:B3,B3)
returns 1
Step 3 - Add count to rank
RANK.EQ(B3,$B$3:$B$9,1)+COUNTIF($B$3:B3,B3)
becomes
1+1 equals 2
Step 4 - Subtract 1
2-1 equals 1
1 is returned to cell C3.
Functions in 'Statistical' category
The RANK.EQ function function is one of 74 functions in the 'Statistical' category.
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.
Contact Oscar
You can contact me through this contact form