Ranking data in Excel means assigning a position to each value based on its relative size compared to others in a list, using the RANK.EQ function to return the rank of a number within a range, where identical values receive the same rank and the next rank is skipped accordingly.
What You'll Need
- Microsoft Excel (any recent version: 2016, 2019, 2021, or Microsoft 365)
- A dataset with numeric values you want to rank (e.g., sales figures, test scores, times)
- Basic familiarity with entering formulas in Excel cells
Step-by-Step
- Open your Excel workbook and locate the column containing the numeric values you want to rank (for example, column B with sales numbers from B2 to B100).
- Click on the cell where you want the rank to appear for the first item (e.g., C2 if you're ranking column B and placing ranks in column C).
- Type the formula: =RANK.EQ(B2,$B$2:$B$100,0) and press Enter. This ranks the value in B2 against the range B2:B100 in descending order (0 means highest value gets rank 1).
- To rank in ascending order (lowest value gets rank 1), change the last argument to 1: =RANK.EQ(B2,$B$2:$B$100,1).
- Click the fill handle (small square at the bottom-right of the cell) and drag it down to copy the formula to other rows (e.g., C3:C100), adjusting the row reference automatically while keeping the range absolute.
- Verify that the range uses absolute references ($B$2:$B$100) so it doesn’t shift when copied; if you see incorrect ranks, check that the dollar signs are present.
- If your data has gaps or text, ensure only numeric values are in the range; RANK.EQ ignores text and logical values but treats empty cells as if they don’t exist, which may affect ranking if not expected.
- For tied values, RANK.EQ assigns the same rank to each duplicate, and the next rank is skipped (e.g., two values tied for rank 2 both get 2, and the next value gets rank 4).
- To see the rank without skipping numbers (dense ranking), use a different approach with COUNTIFS, but note that RANK.EQ does not support this natively.
- If you need to rank across multiple criteria (e.g., rank by sales, then by date), use a helper column combining values or use RANK.EQ with SUMPRODUCT for more complex logic.
- Format the rank column as needed (e.g., no decimal places) using the Home > Number group if the result shows unexpected decimals due to formatting.
Common Mistakes
- Using relative references (like B2:B100) instead of absolute ($B$2:$B$100) in the range, causing the range to shift when copying the formula down, leading to incorrect rankings.
- Forgetting to specify the order argument (0 or 1), which defaults to 0 (descending), potentially giving opposite results if ascending order was intended.
- Including headers or non-numeric cells in the range, which RANK.EQ ignores but can reduce the effective range size and cause confusion if not accounted for.
- Expecting tied ranks to show sequential numbers (e.g., 2,3) instead of equal ranks (e.g., 2,2), not realizing RANK.EQ follows competition ranking where ties get the same rank and the next is skipped.
- Copying the formula without adjusting the row reference correctly, especially if starting mid-column, leading to all ranks referencing the same cell.
Tips
- Use =RANK.EQ(value, range, [order]) and remember: order=0 for descending (highest = rank 1), order=1 for ascending (lowest = rank 1).
- Double-check your range includes all relevant data and excludes summary rows or totals unless you want them ranked.
- If you frequently rank data, consider turning your range into an Excel Table (Insert > Table) so the formula auto-expands when new data is added.
- To rank without skipping numbers after ties, use =SUMPRODUCT((range>value)/COUNTIF(range,range))+1 for descending dense ranking, though this is more complex.
- Always verify a few known values manually: pick the highest number and confirm it gets rank 1 in descending mode.
- Label your rank column clearly (e.g., "Sales Rank") so others understand the ranking direction and logic.
Troubleshooting
If ranks appear incorrect:
- First, check that the formula’s range uses absolute references ($B$2:$B$100). If not, edit the formula to lock the range with dollar signs.
- Second, verify the order argument: are you expecting highest=1 (use 0) or lowest=1 (use 1)? Change the last argument if needed.
- Third, look for non-numeric entries in your range; while RANK.EQ ignores them, ensure your data is clean if rankings seem off due to unexpected gaps.
- Fourth, if tied values aren’t getting the same rank, confirm you’re using RANK.EQ and not RANK.AVG (which gives average rank for ties) or a custom formula.
- Fifth, if the formula returns #VALUE!, ensure the value being ranked is numeric; text or errors in the referenced cell will cause this.
- Finally, if copying the formula down produces errors, check that the row reference (e.g., B2) changes correctly while the range stays fixed.
Frequently Asked Questions
Can I rank text values in Excel?
No, RANK.EQ only works with numeric values; text values are ignored in the range and cannot be ranked directly.
What happens if two values are the same?
They receive the same rank, and the next rank is skipped (e.g., two 2nd places mean the next is 4th).
Does RANK.EQ work in Excel Online?
Yes, RANK.EQ is supported in Excel Online with the same syntax and behavior as desktop versions.
How do I rank from lowest to highest?
Set the third argument (order) to 1 in the RANK.EQ formula: =RANK.EQ(value, range, 1).
Can I exclude zeros or specific values from ranking?
Not directly with RANK.EQ alone; you’d need to filter or use a helper column to replace unwanted values with errors or blanks before ranking.
Is there a difference between RANK and RANK.EQ?
RANK.EQ is the current function; RANK is an older compatibility function that behaves identically in most cases but is retained for backward compatibility.