Rank Scores Within Groups Without Skipping Ranks in Excel
Question details
Rank scores separately within each group, giving tied scores the same rank without skipping the next rank.

- 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.
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.
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.
Select E2, enter =IF(COUNTIFS($A$2:A2,A2,$C$2:C2,C2)=1,1,0), and fill the formula down through E21.
Select D2 and enter =1+SUMIFS($E$2:$E$21,$A$2:$A$21,A2,$C$2:$C$21,">"&C2).
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 dynamic-array formula in Microsoft 365
Use MAP, FILTER, and UNIQUE to return all group ranks from a single formula.
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. Open your worksheet: Open the file in WPS Spreadsheets and place group names in column A and numeric scores in column C.
- 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. 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. Fill and save: Drag the fill handle in D2 down through the data, then choose File > Save to save the worksheet.

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.




