Conditional "Running Sum" Ranking

CF64

Board Regular
Joined
Feb 17, 2021
Messages
50
Office Version
  1. 365
Platform
  1. Windows
Hi, I've looked through some conditional ranking threads but haven't found something which solves my inquiry but apologies if I may have missed a solution.
What I'm trying to do is to do something like a running rank based on point totals for a team and the cumulative weekly point totals.


For example
in column D, I create a running total of points for each team as the week's progress
in column E, I rank that cumulative total for all weeks
in column F, I would like to rank the total just up to the current week.
So, in row 3, I would have the rank of the dolphins total points (which is just 1 week) against the pats and bills for week 1,
then in row 7, would have the rank of the Dolphins total point total for week 1 and 2 against the pats and bills total points for week 1 and 2
then in row 9, would have the rank of the dolphins total points total for week 1, 2, and 3, against the pats and bills total points for weeks 1,2, and 3.
abcdef
1WeekTeamWeekly PointsCumulative points for teamCumulative points rankRunning Rank using cumulative points and week
=sumifs(c:c,b:b,b2,a:a,"<=",a2)=rank(d2,$d$2:$d$10,0)?
21Patriots1010
31Dolphins55
41Bills1010
52Patriots515
62Bills1020
72Dolphins510
83Patriots520
93Dolphins1020
103Bills1030

I hope my example makes sense. Happy to provide clarification if not and thank you in advance for your consideration.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Can you please share what is the desired result in queried column.
 
Upvote 0
If you are looking for the following result in red

WeekTeamWeekly PointsCumulative points for the teamCumulative points rankRunning Rank using cumulative points and week
1Patriots101061
1Dolphins5593
1Bills101061
2Patriots51552
2Bills102021
2Dolphins51063
3Patriots52022
3Dolphins102022
3Bills103011

The formula in F2 and onwards is =SUMPRODUCT(--(A2=$A$2:$A$10),--(D2<$D$2:$D$10))+1

Hope it helps
 
Upvote 0
If you are looking for the following result in red

WeekTeamWeekly PointsCumulative points for the teamCumulative points rankRunning Rank using cumulative points and week
1Patriots101061
1Dolphins5593
1Bills101061
2Patriots51552
2Bills102021
2Dolphins51063
3Patriots52022
3Dolphins102022
3Bills103011

The formula in F2 and onwards is =SUMPRODUCT(--(A2=$A$2:$A$10),--(D2<$D$2:$D$10))+1

Hope it helps
Hello and thank you for your reply. How would I add additional conditions to the same formula? For instance, if I wanted to add a column for year and a column for the "Team's" opponent?
 
Upvote 0
Hello there, the best way is to share data, and what is your expected result in desired columns (marked red or any different way)? it makes understanding the requirement clear.
Regards
 
Upvote 0
Hello there, the best way is to share data, and what is your expected result in desired columns (marked red or any different way)? it makes understanding the requirement clear.
Regards
Hi, Apologies for the confusion with my last reply.

I'm just wondering how to add additional columns (conditions) to the formula you provided for F2 in the table above
"The formula in F2 and onwards is =SUMPRODUCT(--(A2=$A$2:$A$10),--(D2<$D$2:$D$10))+1"

So in my new table, I have a column C for Season . I would like the formula in column f to do exactly the same thing as above but take in to account the season. So the rank is based on the running weekly total for each season. I'm just not sure how add column c to the previous formula

Thank you

abcdef
WeekTeamSeasonWeekly PointsCumulative points for the teamRunning Rank using cumulative points and week
=sumifs(d:d,c:c,c2,b:b,"<=",b2)? how do I add column C into this formula?
=SUMPRODUCT(--(A2=$A$2:$A$18),--(e2<$e$2:$e$18))+1
11Patriots202110101
21Dolphins2021553
31Bills202110101
42Patriots20215152
52Bills202110201
62Dolphins20215103
73Patriots20215202
83Dolphins202110202
93Bills202110301
101Patriots2020553
111Dolphins202010102
121Bills202015151
132Patriots20205103
142Bills202010251
152Dolphins202015251
163patriots20205153
173Dolphins202010352
183Bills202015401
 
Upvote 0
Hello there, what i make out of above is as follows
WeekTeamSeasonWeekly PointsCumulative points for the teamRunning Rank using cumulative points and weekRunning Rank using cumulative points, week and season
1Patriots202110101112021
1Dolphins2021553312021
1Bills202110101112021
2Patriots20215152222021
2Bills202110201122021
2Dolphins20215103222021
3Patriots20215202332021
3Dolphins202110202132021
3Bills202110301132021
1Patriots2020553312020
1Dolphins202010102212020
1Bills202015151112020
2Patriots20205103322020
2Bills202010251222020
2Dolphins202015251122020
3patriots20205153332020
3Dolphins202010352232020
3Bills202015401132020

If you are looking for the above answer, then you will need to add a helper column and then the formula would refer to the helper column instead of "A" column (=SUMPRODUCT(--(J2=$J$2:$J$19),--(D2<$D$2:$D$19))+1) here helper column is "J". Later you can hide it.
please let men know in case you are looking for a different answer.
regards
 
Upvote 0
Sorry for the wrong reference to the D column (=SUMPRODUCT(--(J2=$J$2:$J$19),--(D2<$D$2:$D$19))+1).
The correct reference in the formula column is (=SUMPRODUCT(--(J2=$J$2:$J$19),--(E2<$E$2:$E$19))+1) here helper column is "J".
 
Upvote 0
Sorry for the wrong reference to the D column (=SUMPRODUCT(--(J2=$J$2:$J$19),--(D2<$D$2:$D$19))+1).
The correct reference in the formula column is (=SUMPRODUCT(--(J2=$J$2:$J$19),--(E2<$E$2:$E$19))+1) here helper column is "J".
PLEASE IGNORE REPLY NO. 8 & 9.
Sorry for the wrong reference to the D column (=SUMPRODUCT(--(J2=$J$2:$J$19),--(D2<$D$2:$D$19))+1).
The correct reference in the formula column is (=SUMPRODUCT(--(J2=$J$2:$J$19),--(E2<$E$2:$E$19))+1) here helper column is "J".

A
B
C
D
E
F
G
H
I
J
1WeekTeamSeasonWeekly PointsCumulative points for the teamRunning Rank using cumulative points and week
=SUMPRODUCT(--(A2=$A$2:$A$19),--(E2<$E$2:$E$19))+1
Running Rank using cumulative points, week and season
=SUMPRODUCT(--(J2=$J$2:$J$19),--(E2<$E$2:$E$19))+1
HELPER COLUMN
21Patriots202110101112021
31Dolphins2021553312021
41Bills202110101112021
52Patriots20215152222021
62Bills202110201122021
72Dolphins20215103322021
83Patriots20215202232021
93Dolphins202110202232021
103Bills202110301132021
111Patriots2020553312020
121Dolphins202010102212020
131Bills202015151112020
142Patriots20205103322020
152Bills202010251122020
162Dolphins202015251122020
173patriots20205153332020
183Dolphins202010352232020
193Bills202015401132020
I guess you were looking for the above result, in case you are looking for something different I am again reiterating please enter the desired result in the respective column so that same outcome can be obtained with the formula.
Regards
 
Upvote 0

Forum statistics

Threads
1,223,986
Messages
6,175,789
Members
452,670
Latest member
nogarth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top