Function Problems

Rank Scores Within Groups Without Skipping Ranks in Excel

Anum MushtaqAnum Mushtaq Nov 18, 2026 870 views

Question details

Rank scores separately within each group, giving tied scores the same rank without skipping the next rank.

Rank Scores Within Groups Without Skipping Ranks in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains group names and numeric scores that need to be ranked independently within each group.
Observed behavior
The desired result is a dense rank: tied scores share a rank, and the next distinct score receives the next consecutive rank.
Before you start

Arrange the data with group names in A2:A21 and numeric scores in C2:C21, and leave columns D and E available for results and a helper formula. Adjust the row ranges in the formulas to match your data, and exclude blank rows.

Solution 1Recommended

Use a helper column to calculate dense ranks in Excel

Use COUNTIFS and SUMIFS to rank scores within each group without requiring dynamic-array functions.

The helper column marks the first occurrence of each score within its group. The rank is one plus the number of distinct higher scores in that group.

1
Mark distinct group scores

Select E2, enter =IF(COUNTIFS($A$2:A2,A2,$C$2:C2,C2)=1,1,0), and fill the formula down through E21.

2
Calculate the rank

Select D2 and enter =1+SUMIFS($E$2:$E$21,$A$2:$A$21,A2,$C$2:$C$21,">"&C2).

3
Fill down and check

Drag the fill handle from D2 through D21. For scores 100, 90, 90, and 80 in the same group, the ranks should be 1, 2, 2, and 3.

Use a helper column to calculate dense ranks in Excel
Keep the helper column: Column E must retain its formulas for the ranks in column D to calculate. You can hide column E if you do not need to display it.
Rank scores in WPS Spreadsheets

Create dense group ranks in WPS Spreadsheets

Use COUNTIFS and SUMIFS in WPS Spreadsheets to give tied scores the same rank and keep subsequent ranks consecutive within each group.

  1. 1. Open your worksheet: Open the file in WPS Spreadsheets and place group names in column A and numeric scores in column C.
  2. 2. Add a helper formula: In E2, enter =IF(COUNTIFS($A$2:A2,A2,$C$2:C2,C2)=1,1,0), then drag the fill handle down to the last data row.
  3. 3. Calculate group ranks: In D2, enter =1+SUMIFS($E$2:$E$21,$A$2:$A$21,A2,$C$2:$C$21,">"&C2), adjusting row 21 to the last data row.
  4. 4. Fill and save: Drag the fill handle in D2 down through the data, then choose File > Save to save the worksheet.
Rank tied scores without gaps within each groupOpen and save Microsoft Excel XLSX filesUse familiar spreadsheet formulas and fill controlsWork with a free, easy-to-use office suite
microsoft office alternative - wps office

Frequently Asked Questions

What is a dense rank?

A dense rank assigns the same rank to tied values and does not skip the next rank. For example, scores of 100, 90, 90, and 80 receive ranks of 1, 2, 2, and 3.

Why does Excel skip a rank after a tie?

Standard ranking functions such as RANK.EQ leave gaps after ties. Use the helper-column formula or the Microsoft 365 dynamic-array formula above to produce consecutive ranks.

How do I rank the lowest score first?

In the helper-column rank formula, replace ">"&C2 with "<"&C2. This counts distinct lower scores, so the lowest score in each group receives rank 1.

What if my data extends beyond row 21?

Change each fixed range ending in row 21 to your last data row, and fill the helper and rank formulas down to that row. Keep the ranges in SUMIFS the same size.