How to rank with a tiebreaker in Excel
Formula (Excel and Google Sheets)
=RANK.EQ(B2,$B$2:$B$7)+COUNTIFS($B$2:$B$7,B2,$C$2:$C$7,">"&C2)Rank on the main column, then add the number of tied rows that win on the second: =RANK.EQ(B2,$B$2:$B$7)+COUNTIFS($B$2:$B$7,B2,$C$2:$C$7,">"&C2).
- Result on the example
- one result per row in
D2, filled down toD7 - Works in
- Excel 2010 and later
- Google Sheets
- Same formula
See it work
The formula is already in D2, filled down to D7. Change any input and the result updates, or edit the formula to experiment.
How it works
RANK.EQ gives United and Wanderers both 1st on 24 points. COUNTIFS then counts teams with the same points and a better goal difference: none for Wanderers, one for United, so United moves to 2nd. Rovers and City are separated the same way.
=RANK.EQ(B2,$B$2:$B$7)+COUNTIFS($B$2:$B$7,B2,$C$2:$C$7,">"&C2)Result4
B221The value in B2.
$B$2:$B$76 rows × 1 col: 21, 24, 21, 18, …A range: 6 cells in one column.
RANK.EQ(B2,$B$2:$B$7)3RANK: Rank of a number in a list. 0 or omitted = largest is 1.- number
B221 - ref
$B$2:$B$76 rows × 1 col: 21, 24, 21, 18, …
- number
$C$2:$C$76 rows × 1 col: 8, 5, 12, 3, …A range: 6 cells in one column.
C28The value in C2.
">"&C2">8"The & operator joins as text.
COUNTIFS($B$2:$B$7,B2,$C$2:$C$7,">"&C2)1COUNTIFS: Counts rows that meet every condition.- criteria_range1
$B$2:$B$76 rows × 1 col: 21, 24, 21, 18, … - criteria1
B221 - criteria_range2
$C$2:$C$76 rows × 1 col: 8, 5, 12, 3, … - criteria2
">"&C2">8"
- criteria_range1
RANK.EQ(B2,$B$2:$B$7)+COUNTIFS($B$2:$B$7,B2,$C$2:$C$7,">"&C2)4The + operator adds.
In Google Sheets
The same formula works in Google Sheets: =RANK.EQ(B2,$B$2:$B$7)+COUNTIFS($B$2:$B$7,B2,$C$2:$C$7,">"&C2). We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =COUNTIF($B$2:$B$7,">"&B2)+COUNTIFS($B$2:$B$7,B2,$C$2:$C$7,">"&C2)+1 | 4, 2, 3… | Without RANK.EQ: teams with more points, plus tied teams with a better goal difference, plus one. |
| =RANK.EQ(B2,$B$2:$B$7) | 3, 1, 3…Different result | Points only. Teams on equal points share a position: 3, 1, 3, 5, 1, 6. |
Common mistakes
- Teams equal on both points and goal difference still share a position. Add a third test, like goals scored, if you need every rank unique.
- Use
">"for a tiebreaker where higher is better and"<"where lower is better, like time taken.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Rank with a tiebreaker
D2, rank the team by points, using goal difference to separate teams on equal points, then fill down to D7.Questions
How do I add a third tiebreaker?
Add another COUNTIFS for rows tied on both: +COUNTIFS($B$2:$B$7,B2,$C$2:$C$7,C2,$E$2:$E$7,">"&E2).
How do I sort the table by position?
In Excel 365: =SORTBY(A2:C7,D2:D7,1).
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.