To take out a rank in Excel, use the RANK function (or its newer equivalents, RANK.EQ and RANK.AVG) in an empty cell next to your data: =RANK(number, ref, [order]). For example, =RANK(B2,$B$2:$B$10,0) returns the rank of the value in B2 within the range B2:B10, with 0 meaning descending order (largest value ranks first). This lets you see where each value sits relative to the rest of the list, which is useful for leaderboards, sales comparisons, test scores, and any list where you need a position rather than a raw number.
What You'll Need
- A version of Excel that supports RANK, RANK.EQ, or RANK.AVG (Excel 2010 or later covers all three; older versions only have RANK).
- A column or row of numeric values to rank, with no blank cells inside the range you plan to use.
- An empty column beside your data for the rank results.
Step-by-Step
- Open your spreadsheet and confirm the values you want to rank are stored as numbers, not text. Numbers aligned to the left of a cell are usually text and will not rank correctly; if needed, select the column, open the Data tab, and use Text to Columns or multiply by 1 in a helper cell to convert them.
- Click the first empty cell in the column beside your data (for example, C2 if your values start in B2).
- Type
=RANK(to begin the formula. Excel will show a tooltip listing the arguments: number, ref, and order. - Select the cell containing the first value you want to rank (for example, B2), then type a comma.
- Select the entire range of values to rank against (for example, B2:B10). Press F4 to make it an absolute reference (it becomes $B$2:$B$10) so the range does not shift when you copy the formula down.
- Type a comma, then enter 0 for descending order (largest value gets rank 1) or 1 for ascending order (smallest value gets rank 1). Close the parenthesis and press Enter.
- Copy the formula down the column by dragging the fill handle (the small square at the bottom-right of the cell) or by double-clicking it. Each row now shows its rank.
- If you prefer the newer function, replace RANK with RANK.EQ for identical behavior, or RANK.AVG to give tied values the average of the ranks they would otherwise receive.
Menu labels and function availability can differ slightly by Excel version, platform, and region, so if a name does not appear exactly as written, look for the closest match in the Formulas tab under More Functions > Statistical.
Common Mistakes
- Using a relative range (B2:B10) instead of an absolute range ($B$2:$B$10). When copied down, the range shifts and ranks become wrong.
- Including the header row in the ref range. The header text is ignored by RANK, but it is easy to misalign the range and skip real values.
- Leaving blanks inside the range. Blank cells are ignored, but they can make the range inconsistent if you later add data below it.
- Forgetting the order argument. If omitted, Excel defaults to descending order, which may not be what you intended.
- Ranking text-formatted numbers. They return errors or unexpected results until converted to real numbers.
Tips
- Use RANK.EQ when you want ties to share the same rank, and RANK.AVG when you want tied values to receive an averaged rank.
- To rank only visible rows in a filtered list, RANK alone will not do it; use SUBTOTAL-based helper formulas or the newer dynamic array functions if your Excel version supports them.
- For a percentile-style position instead of a rank, use PERCENTRANK or PERCENTRANK.INC on the same range.
- Keep the rank column separate from the source data so sorting the source does not scramble your results.
- If you need ranks to update automatically as values change, the formula approach already does this; avoid pasting ranks as values unless you want them frozen.
Troubleshooting
- #N/A error: The number argument is not found in the ref range, often because the range is wrong or the value is text. Check both.
- All ranks are 1: The ref range likely contains only one cell, or the absolute reference was not applied and the range collapsed as you copied.
- Ranks look shifted by one: The header row or an extra blank row is included in the range. Adjust the range to start and end on actual data.
- Formula shows as text: The cell may be formatted as Text. Change the format to General and re-enter the formula.
- RANK not recognized: In very old Excel versions, only RANK exists; use that instead of RANK.EQ or RANK.AVG.
Frequently Asked Questions
What is the difference between RANK, RANK.EQ, and RANK.AVG?
RANK is the original function. RANK.EQ behaves the same way and gives tied values the same rank. RANK.AVG gives tied values the average of the ranks they would have received.
How do I rank in ascending order?
Set the third argument to 1 instead of 0. The smallest value then receives rank 1.
Why do I get the same rank for different values?
Those values are equal, so RANK and RANK.EQ assign them the same rank and skip the following rank numbers. Use RANK.AVG if you want averaged ranks instead.
Can I rank only part of a list?
Yes. Set the ref range to just the cells you want to compare. RANK only considers values inside that range.
Does RANK work on filtered or hidden rows?
RANK includes hidden and filtered-out rows because it looks at the whole range. To rank only visible rows you need a different approach, such as SUBTOTAL-based helper formulas.
Can I rank text values?
No. RANK works on numbers only. Text values return an error, so convert or exclude them first.