Ranking Data Based on Multiple Criteria

sethk1024

New Member
Joined
Aug 31, 2022
Messages
14
Office Version
  1. 365
Platform
  1. MacOS
As the title suggests, I'm looking to use the RANK function in excel, however, I'd like to rank given samples of data within multiple criteria.

I've attached an abbreviated sample of a much larger data set in the image here.

In the first table on the left...

I have 3 NFL football players mentioned, with 4 weeks of points scored in each of 2 seasons, 2019 and 2020. For the sake of this data, lets assume 4 weeks of scoring in a given year constitutes a "full season" for that player.

The primary thing I'd like to do here is rank the points scored based on:
- the player who scored the points
- the week the points are scored in
- the year the points are scored in

So, for example, Aaron Rodgers in Week 1 of 2019 scored 29 points. Amongst other players who played in Week 1 of 2019 in this dataset, that score of 29 points ranks first.

I'd like to rank all scores of all weeks in all years in a similar manner.


Then, using that data, I'd like to create a separate rank (in the table on the right) which sums up all the points scored for all the weeks in a given year, and ranks that sum amongst other players who played in a given season. This again is based on:
- the player who scored the points
- all weeks the points are scored in a given season
- the year the points are scored in

So, for example, Aaron Rodgers had 81 points in 4 games played in 2019, which ranks second amongst the three players in this dataset.

I'd like to do this ranking for each year of data for a given player, as well as the average of all years of data.

So, for example, taking the average of all points Aaron Rodgers scored in 2019, and 2020 (all available data points for a given player in the large dataset for points scored), he finished with the second most points amongst the three players mentioned.


Lastly, I'd like to rank the average weekly finish.

So, for example, when averaging the weekly finishes (lowest rank = most points in a given week) of Aaron Rodgers in 2019, Aaron Rodgers finished second, meaning, he finished as the highest ranked QB, on average, second most often. I would like to rank this based on the same criteria as the above when we calculated the yearly point total ranks.



I know this is a lengthy post without various calculations and is probably worded a bit poorly and confusing! If there's anything I can do to simplify the post and clarify any confusion, please let me know. Thank you very much and I appreciate the help!!
 

Attachments

  • Screen Shot 2022-09-01 at 9.46.46 AM.png
    Screen Shot 2022-09-01 at 9.46.46 AM.png
    77.6 KB · Views: 57

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
It requires 2 helpers columns for the right table
Book1
ABCDEFGHIJKLMNO
1PlayerYearWeekPointsWeeklyFinishesPlayerYearYearly Total Points RankRank of Average Weekly FinishesYearly Total PointsAverage Weekly Finishes
2AA20191291AA201932812.25
3AA20192163BB2019111201.25
4AA20193212CC201923942.50
5AA20194153AA202032952.00
6AA20201291BB2020111061.75
7AA20202192CC202023962.25
8AA20203232AAAll321762.13
9AA20204243BBAll112261.50
10BB20191282CCAll231902.38
11BB20192331
12BB20193231
13BB20194361
14BB20201262Helper Columns
15BB20202173
16BB20203261
17BB20204371
18CC20191243
19CC20192172
20CC20193193
21CC20194342
22CC20201163
23CC20202281
24CC20203203
25CC20204322
Sheet1
Cell Formulas
RangeFormula
L2:L10L2=COUNTIFS($K$2:$K$10,K2,$N$2:$N$10,">=" &N2)
M2:M10M2=COUNTIFS($K$2:$K$10,K2,$O$2:$O$10,"<=" &O2)
N2:N10N2=IF(K2="All",SUMIFS($D$2:$D$25,$A$2:$A$25,J2),SUMIFS($D$2:$D$25,$A$2:$A$25,J2,$B$2:$B$25,K2))
O2:O10O2=IF(K2="All",AVERAGEIFS($E$2:$E$25,$A$2:$A$25,J2),AVERAGEIFS($E$2:$E$25,$A$2:$A$25,J2,$B$2:$B$25,K2))
E2:E25E2=COUNTIFS($B$2:$B$25,B2,$C$2:$C$25,C2,$D$2:$D$25,">=" & D2)
 
Upvote 0
It requires 2 helpers columns for the right table
Book1
ABCDEFGHIJKLMNO
1PlayerYearWeekPointsWeeklyFinishesPlayerYearYearly Total Points RankRank of Average Weekly FinishesYearly Total PointsAverage Weekly Finishes
2AA20191291AA201932812.25
3AA20192163BB2019111201.25
4AA20193212CC201923942.50
5AA20194153AA202032952.00
6AA20201291BB2020111061.75
7AA20202192CC202023962.25
8AA20203232AAAll321762.13
9AA20204243BBAll112261.50
10BB20191282CCAll231902.38
11BB20192331
12BB20193231
13BB20194361
14BB20201262Helper Columns
15BB20202173
16BB20203261
17BB20204371
18CC20191243
19CC20192172
20CC20193193
21CC20194342
22CC20201163
23CC20202281
24CC20203203
25CC20204322
Sheet1
Cell Formulas
RangeFormula
L2:L10L2=COUNTIFS($K$2:$K$10,K2,$N$2:$N$10,">=" &N2)
M2:M10M2=COUNTIFS($K$2:$K$10,K2,$O$2:$O$10,"<=" &O2)
N2:N10N2=IF(K2="All",SUMIFS($D$2:$D$25,$A$2:$A$25,J2),SUMIFS($D$2:$D$25,$A$2:$A$25,J2,$B$2:$B$25,K2))
O2:O10O2=IF(K2="All",AVERAGEIFS($E$2:$E$25,$A$2:$A$25,J2),AVERAGEIFS($E$2:$E$25,$A$2:$A$25,J2,$B$2:$B$25,K2))
E2:E25E2=COUNTIFS($B$2:$B$25,B2,$C$2:$C$25,C2,$D$2:$D$25,">=" & D2)
sorry for the slow reply. ive been playing around with a bunch of stuff and trying to understand everything you wrote out in the sheet.

*thank you so much* – this is exactly what I needed. extremely helpful!
 
Upvote 0
It requires 2 helpers columns for the right table
Book1
ABCDEFGHIJKLMNO
1PlayerYearWeekPointsWeeklyFinishesPlayerYearYearly Total Points RankRank of Average Weekly FinishesYearly Total PointsAverage Weekly Finishes
2AA20191291AA201932812.25
3AA20192163BB2019111201.25
4AA20193212CC201923942.50
5AA20194153AA202032952.00
6AA20201291BB2020111061.75
7AA20202192CC202023962.25
8AA20203232AAAll321762.13
9AA20204243BBAll112261.50
10BB20191282CCAll231902.38
11BB20192331
12BB20193231
13BB20194361
14BB20201262Helper Columns
15BB20202173
16BB20203261
17BB20204371
18CC20191243
19CC20192172
20CC20193193
21CC20194342
22CC20201163
23CC20202281
24CC20203203
25CC20204322
Sheet1
Cell Formulas
RangeFormula
L2:L10L2=COUNTIFS($K$2:$K$10,K2,$N$2:$N$10,">=" &N2)
M2:M10M2=COUNTIFS($K$2:$K$10,K2,$O$2:$O$10,"<=" &O2)
N2:N10N2=IF(K2="All",SUMIFS($D$2:$D$25,$A$2:$A$25,J2),SUMIFS($D$2:$D$25,$A$2:$A$25,J2,$B$2:$B$25,K2))
O2:O10O2=IF(K2="All",AVERAGEIFS($E$2:$E$25,$A$2:$A$25,J2),AVERAGEIFS($E$2:$E$25,$A$2:$A$25,J2,$B$2:$B$25,K2))
E2:E25E2=COUNTIFS($B$2:$B$25,B2,$C$2:$C$25,C2,$D$2:$D$25,">=" & D2)

Hey thanks again. I've been playing around with this trying to implement in my sheet , however, i noticed a shortcoming in the solution you provided.

It only works as you coded it because, for example, if i want to rank the yearly total points, it uses the helper column to the right of the table, which only has 10 rows.

but i realized if i add new players to the dataset, it no longer works. i have thousands of cells for a given player pool, so to copy the cells over and over would get messy. know what I mean?

is there another solution, maybe something I can add to the original table that would allow me to reference the original data without needing ALL of that data in the helper table?

what i mean is...

the original data set has THOUSANDS of players in the ranking.

however, my final table only has a small fraction of those players.

having to have a table with all of the players would be both cumbersome, and useless for my end goal.

if you need more clarification, i will gladly provide it. not sure if my issue is making sense?
 
Upvote 0
With thousand players, VBA should be a good choice.
Is it acceptable?
Try to attch a mini sheet via XL2BB.
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,138
Members
453,021
Latest member
Justyna P

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