How to use the RANK.AVG function
What is the RANK.AVG function?
The RANK.AVG function returns the rank of a number in a list of numbers.
The number returned indicates its size relative to other values in the list. If more than one value share the same rank, the average rank is returned.
Table of Contents
1. Introduction
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, note that the RANK.AVG function does not rank numbers like the image demonstrates above.
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.
2. RANK.AVG Function Syntax
RANK.AVG(number, ref, [order])
3. RANK.AVG Function Arguments
number | Required. The number whose rank you want to find. |
ref | Required. A list of numbers. |
[order] | Optional. A number specifying how to rank number. 0 - Excel ranks number as if ref were a list sorted in descending order. Default value. Any other number - 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
4. RANK.AVG Function Example 1
This example demonstrates how to calculate the rank of number 77 in this group: 66, 97, 99, 77, 9, 60, 35, 60, 61. Cell range B3:B11 contains the data.
The arguments are:
- number = 77
- ref = B3:B11
- [order] = 0 meaning descending order
Formula in cell D3:
The formula in cell D3 returns 3 meaning it is the third largest number in the group. The largest number is 99 and the second largest is 97.
This technique can quickly tell you where a number is in the range and also if it is an outlier.
5. RANK.AVG Function Example 2
The RANK.AVG function returns the average rank if two or more numbers share the same rank. The image above shows the test scores in cell range B3:B11 and the sorted scores in F3:F11 in descending order. The corresponding RANK.AVG ranks are in E3:E11 and RANK.EQ in D3:D11.
The test scores in cell range B3:B11 contain two identical numbers which are 60. They get rank 6 and 7, however the RANK.AVG calculates the average rank when two or more values are identical. The average of 6 and 7 is 6+7=13, 13/2 = 6.5
Number 60 is in both cells E8:E9, the average rank for 60 in this group is 6.5. Note that rank 6 and 7 are not displayed at all, only the average rank 6.5 in both locations.
Formula in cell E3:
The RANK.EQ function returns the same rank for identical values, for example, number 60 is ranked 6 in both locations in D8:D9.
Formula in cell D3:
This demonstration shows the differences between the RANK.AVG and RANK.EQ functions.
6. RANK.AVG Function Example 3
In a sales team, each member's performance is evaluated based on their monthly sales revenue. How can you use the RANK.AVG function to rank the sales team members based on their performance, taking into account any ties? Here is the sales data:
Name | Sales |
John | 113,200 |
Laura | 77,100 |
Emma | 91,900 |
Jeff | 79,400 |
Tina | 116,900 |
Lisa | 111,400 |
Linda | 92,500 |
Walter | 113,200 |
Anna | 96,000 |
The arguments are:
- number = C14
- ref = $C$14:$C$22
- [order] = not specified, default value is 0 (zero) meaning descending order
Cell range D14:D22 contains the rank based on the sales numbers in C14:C22. The highest rank is 1 and that number represents the highest sales number in the group, Tina has rank 1.
The second rank is shared between John and Walter, they both have a rank value of 2.5. The image above also displays a column chart that shows each persons sales numbers and the data labels above the columns tells us the rank.
Formula in cell D14:
This formula in cell D14 is copied to cells below as far as needed. The ref argument $C$14:$C$22 contains dollar signs meaning the cell reference is an absolute cell reference. It doesn't change when the cell is copied to cells below, however, C14 is a relative cell reference. It does change when the cell is copied to cells below.
7. RANK.AVG Function not working
- Non-numeric values in Ref are ignored.
- The RANK.AVG function returns a #N/A value if a number in the first argument is not in the ref range.
Functions in 'Statistical' category
The RANK.AVG function function is one of 73 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