JenniferMurphy
Well-known Member
- Joined
- Jul 23, 2011
- Messages
- 2,691
- Office Version
- 365
- Platform
- Windows
Is there a way to calculate the change in rankings (+/-) in two lists that are sorted by that ranking? That is, the ranked entities are not in the same order in both lists, so I cannot compare one entity with the entity in the same row in the other list.
These are the top ten NFL teams as ranked by one odds-making website. I calculated the values in the +/- column by hand. I'd like to find a way to do it automatically.
[TABLE="width: 651"]
<tbody>[TR]
[TD]Rank[/TD]
[TD]Team[/TD]
[TD="colspan: 2"]Start of Season[/TD]
[TD]Rank[/TD]
[TD]+/-[/TD]
[TD]Team[/TD]
[TD="colspan: 2"]Week 1[/TD]
[/TR]
[TR]
[TD]#1[/TD]
[TD]Denver Broncos[/TD]
[TD]6/1[/TD]
[TD]16.67%[/TD]
[TD]#1[/TD]
[TD]n/c[/TD]
[TD]Seattle Seahawks[/TD]
[TD]4/1[/TD]
[TD]25.00%[/TD]
[/TR]
[TR]
[TD]#1[/TD]
[TD]Seattle Seahawks[/TD]
[TD]6/1[/TD]
[TD]16.67%[/TD]
[TD]#2[/TD]
[TD]n/c[/TD]
[TD]Denver Broncos[/TD]
[TD]11/2[/TD]
[TD]18.18%[/TD]
[/TR]
[TR]
[TD]#3[/TD]
[TD]New England Patriots[/TD]
[TD]8/1[/TD]
[TD]12.50%[/TD]
[TD]#3[/TD]
[TD]n/c[/TD]
[TD]New England Patriots[/TD]
[TD]10/1[/TD]
[TD]10.00%[/TD]
[/TR]
[TR]
[TD]#4[/TD]
[TD]Green Bay Packers[/TD]
[TD]11/1[/TD]
[TD]9.09%[/TD]
[TD]#4[/TD]
[TD]n/c[/TD]
[TD]New Orleans Saints[/TD]
[TD]12/1[/TD]
[TD]8.33%[/TD]
[/TR]
[TR]
[TD]#4[/TD]
[TD]New Orleans Saints[/TD]
[TD]11/1[/TD]
[TD]9.09%[/TD]
[TD]#4[/TD]
[TD]+2[/TD]
[TD]San Francisco 49ers[/TD]
[TD]12/1[/TD]
[TD]8.33%[/TD]
[/TR]
[TR]
[TD]#6[/TD]
[TD]San Francisco 49ers[/TD]
[TD]12/1[/TD]
[TD]8.33%[/TD]
[TD]#6[/TD]
[TD]-2[/TD]
[TD]Green Bay Packers[/TD]
[TD]15/1[/TD]
[TD]6.67%[/TD]
[/TR]
[TR]
[TD]#7[/TD]
[TD]Philadelphia Eagles[/TD]
[TD]20/1[/TD]
[TD]5.00%[/TD]
[TD]#7[/TD]
[TD]n/c[/TD]
[TD]Philadelphia Eagles[/TD]
[TD]20/1[/TD]
[TD]5.00%[/TD]
[/TR]
[TR]
[TD]#8[/TD]
[TD]Chicago Bears[/TD]
[TD]26/1[/TD]
[TD]3.85%[/TD]
[TD]#8[/TD]
[TD]+3[/TD]
[TD]Cincinnati Bengals[/TD]
[TD]25/1[/TD]
[TD]4.00%[/TD]
[/TR]
[TR]
[TD]#9[/TD]
[TD]Indianapolis Colts[/TD]
[TD]28/1[/TD]
[TD]3.57%[/TD]
[TD]#8[/TD]
[TD]+1[/TD]
[TD]Pittsburgh Steelers[/TD]
[TD]25/1[/TD]
[TD]4.00%[/TD]
[/TR]
[TR]
[TD]#9[/TD]
[TD]Pittsburgh Steelers[/TD]
[TD]28/1[/TD]
[TD]3.57%[/TD]
[TD]#10[/TD]
[TD]-1[/TD]
[TD]Indianapolis Colts[/TD]
[TD]30/1[/TD]
[TD]3.33%[/TD]
[/TR]
</tbody>[/TABLE]
I was able to get it done with a multi-step procedure:
This works, but it's a little tedious. Is there a way I can do it on the lists without resorting?
These are the top ten NFL teams as ranked by one odds-making website. I calculated the values in the +/- column by hand. I'd like to find a way to do it automatically.
[TABLE="width: 651"]
<tbody>[TR]
[TD]Rank[/TD]
[TD]Team[/TD]
[TD="colspan: 2"]Start of Season[/TD]
[TD]Rank[/TD]
[TD]+/-[/TD]
[TD]Team[/TD]
[TD="colspan: 2"]Week 1[/TD]
[/TR]
[TR]
[TD]#1[/TD]
[TD]Denver Broncos[/TD]
[TD]6/1[/TD]
[TD]16.67%[/TD]
[TD]#1[/TD]
[TD]n/c[/TD]
[TD]Seattle Seahawks[/TD]
[TD]4/1[/TD]
[TD]25.00%[/TD]
[/TR]
[TR]
[TD]#1[/TD]
[TD]Seattle Seahawks[/TD]
[TD]6/1[/TD]
[TD]16.67%[/TD]
[TD]#2[/TD]
[TD]n/c[/TD]
[TD]Denver Broncos[/TD]
[TD]11/2[/TD]
[TD]18.18%[/TD]
[/TR]
[TR]
[TD]#3[/TD]
[TD]New England Patriots[/TD]
[TD]8/1[/TD]
[TD]12.50%[/TD]
[TD]#3[/TD]
[TD]n/c[/TD]
[TD]New England Patriots[/TD]
[TD]10/1[/TD]
[TD]10.00%[/TD]
[/TR]
[TR]
[TD]#4[/TD]
[TD]Green Bay Packers[/TD]
[TD]11/1[/TD]
[TD]9.09%[/TD]
[TD]#4[/TD]
[TD]n/c[/TD]
[TD]New Orleans Saints[/TD]
[TD]12/1[/TD]
[TD]8.33%[/TD]
[/TR]
[TR]
[TD]#4[/TD]
[TD]New Orleans Saints[/TD]
[TD]11/1[/TD]
[TD]9.09%[/TD]
[TD]#4[/TD]
[TD]+2[/TD]
[TD]San Francisco 49ers[/TD]
[TD]12/1[/TD]
[TD]8.33%[/TD]
[/TR]
[TR]
[TD]#6[/TD]
[TD]San Francisco 49ers[/TD]
[TD]12/1[/TD]
[TD]8.33%[/TD]
[TD]#6[/TD]
[TD]-2[/TD]
[TD]Green Bay Packers[/TD]
[TD]15/1[/TD]
[TD]6.67%[/TD]
[/TR]
[TR]
[TD]#7[/TD]
[TD]Philadelphia Eagles[/TD]
[TD]20/1[/TD]
[TD]5.00%[/TD]
[TD]#7[/TD]
[TD]n/c[/TD]
[TD]Philadelphia Eagles[/TD]
[TD]20/1[/TD]
[TD]5.00%[/TD]
[/TR]
[TR]
[TD]#8[/TD]
[TD]Chicago Bears[/TD]
[TD]26/1[/TD]
[TD]3.85%[/TD]
[TD]#8[/TD]
[TD]+3[/TD]
[TD]Cincinnati Bengals[/TD]
[TD]25/1[/TD]
[TD]4.00%[/TD]
[/TR]
[TR]
[TD]#9[/TD]
[TD]Indianapolis Colts[/TD]
[TD]28/1[/TD]
[TD]3.57%[/TD]
[TD]#8[/TD]
[TD]+1[/TD]
[TD]Pittsburgh Steelers[/TD]
[TD]25/1[/TD]
[TD]4.00%[/TD]
[/TR]
[TR]
[TD]#9[/TD]
[TD]Pittsburgh Steelers[/TD]
[TD]28/1[/TD]
[TD]3.57%[/TD]
[TD]#10[/TD]
[TD]-1[/TD]
[TD]Indianapolis Colts[/TD]
[TD]30/1[/TD]
[TD]3.33%[/TD]
[/TR]
</tbody>[/TABLE]
I was able to get it done with a multi-step procedure:
- Sort both lists by team name.
- Calculate the change now that the teams are on the same row.
- Convert the results to text.
- Resort both lists by rank.
This works, but it's a little tedious. Is there a way I can do it on the lists without resorting?