To rank data from highest to lowest in Excel, use the RANK.EQ function with the order argument set to 0. For example, if your numbers are in cells A2 through A10, enter =RANK.EQ(A2, $A$2:$A$10, 0) in cell B2 and drag the formula down. This assigns the number 1 to the highest value, 2 to the second highest, and so on.
What You'll Need
- A computer with Microsoft Excel installed (works in Excel 365, 2021, 2019, and older versions).
- A dataset containing numerical values (such as test scores, sales figures, or race times).
- A blank column adjacent to your data to house the rank results.
Step-by-Step
- Prepare Your Data: Ensure your numerical data is organized in a single column. For this guide, we will assume your values are in Column A, starting from cell A2 down to A11, with a header in A1.
- Create a Rank Column: Click on cell B1 and type "Rank" to label your new column. This keeps your spreadsheet organized and ensures you know exactly what the numbers in Column B represent.
- Enter the RANK.EQ Formula: Click on cell B2. Type the following formula exactly:
=RANK.EQ(A2, $A$2:$A$11, 0).
Breakdown of this formula:A2: This is the "number" you want to rank. It is the specific value in the current row.$A$2:$A$11: This is the "ref" or the range containing all the numbers you are comparing against. The dollar signs ($) create absolute references, meaning when you copy the formula down, Excel will always look at this exact range and won't shift the selection downward.0: This is the "order." A value of 0 (or leaving it blank) tells Excel to rank in descending order (highest value = 1). A value of 1 would rank in ascending order (lowest value = 1).
- Apply the Formula to All Rows: Once you press Enter in cell B2, you will see the rank for the first item. To apply this to the rest of your list, hover your mouse over the bottom-right corner of cell B2 until the cursor turns into a small black cross (the Fill Handle). Click and drag the handle down to cell B11.
- Verify the Results: Look at your highest number in Column A; it should now have a 1 next to it in Column B. The lowest number should have the highest rank number (e.g., 10).
- (Optional) Sort the Data: If you want the list to physically move so the #1 rank is at the top, highlight your entire data range (A1:B11). Go to the Data tab in the top ribbon and click Sort. In the Sort dialog box, select "Rank" under the "Sort by" dropdown and choose "Smallest to Largest." Click OK.
Common Mistakes
One of the most frequent errors is forgetting the absolute references (the dollar signs) in the range part of the formula. If you type =RANK.EQ(A2, A2:A11, 0) without the dollar signs, Excel uses a relative reference. When you drag the formula down to cell B3, it changes to =RANK.EQ(A3, A3:A12, 0). This means the formula is no longer looking at the top of your list, and your rankings will become mathematically incorrect as you move down the column.
Another common mistake is confusing the "Order" argument. Users often assume that because they want the "highest" rank, they should put a "1" in the order section. However, in Excel's RANK functions, 0 is for descending (Highest = 1) and 1 is for ascending (Lowest = 1). If your results look inverted, check this digit first.
Lastly, users sometimes try to rank data that contains non-numerical characters or numbers stored as text. If a cell looks like a number but is formatted as text, Excel may ignore it or return a #VALUE! error, leading to gaps in your ranking sequence.
Tips
Handling Ties: By default, RANK.EQ handles ties by giving them the same rank. For example, if two people both have a score of 95 and that is the highest score, both will be ranked 1. The next person with a score of 90 will be ranked 3 (skipping 2). This is known as "Competition Ranking."
Using RANK.AVG: If you prefer ties to be averaged, use =RANK.AVG(). In the tie example mentioned above, both people with 95 would be ranked 1.5, and the person with 90 would be ranked 3. This is often used in statistical analysis to maintain a consistent average rank across a dataset.
Dynamic Ranges with Tables: Instead of using fixed ranges like $A$2:$A$11, convert your data into an official Excel Table (Ctrl + T). When you enter a rank formula in a table, Excel uses structured references (e.g., [#Data]). This means as you add new rows to the bottom of the table, the rank formula automatically expands to include the new data without you having to manually update the range in the formula.
Combining with IF: You can wrap your rank formula in an IF statement to keep the cell blank if the source cell is empty. For example: =IF(A2="", "", RANK.EQ(A2, $A$2:$A$11, 0)). This prevents your spreadsheet from showing errors or ranks for empty rows.
Troubleshooting
The formula returns #N/A: This usually happens if the value you are trying to rank (the first argument) is not found within the range you specified (the second argument). Check to ensure the cell you are ranking is actually part of the range you highlighted. Also, ensure there are no hidden characters or spaces in your cells that might make a number appear as text.
The ranks are all the same: This occurs if you accidentally used absolute references for the first argument. If your formula looks like =RANK.EQ($A$2, $A$2:$A$11, 0), every single row will calculate the rank for cell A2. Remove the dollar signs from the first cell reference so it can change as you drag the formula down.
The ranking order is backwards: If the smallest number is ranked 1 and the largest is ranked 10, you have set the order argument to 1. Change the 0 at the end of your formula to 0, or remove it entirely, as Excel defaults to 0 (descending) if the argument is omitted.
Numbers are not ranking correctly: Check for "Numbers stored as Text." If you see a small green triangle in the corner of your data cells, Excel thinks those numbers are text. Highlight the cells, click the warning icon that appears, and select "Convert to Number."
Frequently Asked Questions
What is the difference between RANK, RANK.EQ, and RANK.AVG?
RANK is an older version of the function. RANK.EQ (Equal) is the modern replacement; it assigns the same rank to tied values. RANK.AVG assigns the average rank to tied values (e.g., two people tied for 1st both get 1.5).
Can I rank data across different sheets?
Yes. In the range argument of your formula, instead of selecting cells on the current sheet, click over to the other sheet and highlight the range. Excel will automatically add the sheet name to the formula (e.g., Sheet2!$A$2:$A$11).
How do I rank without skipping numbers after a tie?
Standard RANK functions use competition ranking (1, 1, 3). To achieve "dense ranking" (1, 1, 2), you cannot use a simple RANK function. You would need a more complex formula using SUMPRODUCT and COUNTIF to count only unique values.
Does the order of my data matter before ranking?
No. The RANK.EQ function looks at the values regardless of their position. You can have your data in any order, and the formula will correctly identify the highest and lowest values. Sorting is only necessary if you want the final visual presentation to be ordered.
Will this work in Google Sheets?
Yes, the RANK and RANK.EQ functions work almost identically in Google Sheets, using the same syntax and arguments.