Trouble Ranking in One Column Using Different Criteria

Labamba32

New Member
Joined
Oct 8, 2013
Messages
21
Hi All,

Looking for a little help and perhaps creativity. I built a pretty extensive spreadsheet to run my football pool. I made a template pick sheet so when players send me their weekly picks I just copy and paste them into a "raw data" tab (this is literally a tab of nothing but everyone's picks for the entire season). From this I can then enter in the game winners on another tab and through a series of formulas on a third tab I'm able to calculate tie breaks etc to come up with our weekly winners. I display the weekly winners in an easy to read weekly format but for tracking purposes I also have a tab that keeps historical results. I've designed the historical results tab like this:
PlayerSeasonWeek #Weekly Total ScoreRank
A20151103
B20151122
A2016194
B20161151

<tbody>
</tbody>

The problem I'm having is after the first season the rank function is ranking all weekly total scores for all seasons (i.e rows 1 - 4) vs just the individual seasons (i.e. 1-2 and 3-4). I realize the easy way to solve this would be to have the rank function applied only to the rows for which that season is contained vs the column as a whole however since we have players come and go that can be a bit difficult to predict. Another solution I thought of was to have multiple rank columns that would only rank if the season matched (i.e. the header would be 2015 and if column B was 2015 it would only rank those rows). However the problem with that is that as we get further into the future i'm always having to add columns. I was hoping to find a more all inclusive solution in one column but am stumped thus far. Any ideas would be greatly appreciated.

Some other info: I don't know much about VBA but am willing to learn. Ideally I'd like to take this to an online set up where people could log in and make their picks on their own with out having me send a pick sheet template and them send it back in Excel (even better would be if I could have the picks locked and displayed as games kicked off as well as results automatically recorded as games completed). Then if I'm totally dreaming a linked app for mobile view would be amazing, LOL. I realize there are sites that do this for a small fee or even for free but we have a few unique things about our pool (multiple competitions at the same time) that I'm able to build into one Excel file which I haven't seen any of the sites do yet. So I'm thinking it would have to be a custom site (which I'm totally willing to learn just need some guidance). Gotta crawl before I can walk though so any solution even if its still in the excel file is sufficient.

Thanks in advance.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Hi,

Convert your RAnk formula to this and it calculates the rank per season.
Hope this helps:


Excel 2016 (Windows) 64 bit
ABCDEF
1PlayerSeasonWeek #Weekly Total ScoreRank
2A20151102
3B20151121
4A2016192
5B20161151
Sheet1
Cell Formulas
RangeFormula
E2=1+SUMPRODUCT(($B$2:$B$5=B2)*($D$2:$D$5>D2))
 
Upvote 0
Hi thanks of for this formula - this works if the only criteria for ranking was the season. However once I added a new row with player C for 2016 season in week # 2 it ranked that row in with the other 2016 rows. However this should be separate since its for week 2 not week 1. So to clarify each week of each season needs to be ranked as a set not just the seasons as a whole. Any suggestions? For clarity this is what I'm getting now. Player C should be ranked 1 since they are the only one in 2016 week 2:

PlayerSeasonWeek #Weekly TotalRank
A20151102
B20151121
A2016192
B20161151
C2016283

<colgroup><col width="64" style="width:48pt" span="5"> </colgroup><tbody>
</tbody>
 
Upvote 0
Hi,

Just add the week criteria to the formula

=1+SUMPRODUCT(($B$2:$B$6=B2)*($C$2:$C$6=C2)*($D$2:$D$5>D2))
 
Upvote 0
This worked great, now the only issue is its taking forever to calculate. I know that i can turn calculations to manual but is there anything else I can do? I send the sheet to others who aren't excel savvy and they'd have no idea how to manually turn on the calcs. Currently my formula is as follows:

=SUMPRODUCT(($B:$B=$B3)*($C:$C=$C3)*($U:$U>$U3))+1

Its calculating over 1200 rows now and I anticipate adding 600ish rows each year.
 
Upvote 0
Hi,
All formulas with usage off array type functions like sumproduct or countif will always be draining on calculation time when used with full columns as criteria.
Regardless the usage of Marcelo's or my solution, you should consider to limit the ranges used as they drain unnecessary calculation time.
 
Upvote 0
Hi,
All formulas with usage off array type functions like sumproduct or countif will always be draining on calculation time when used with full columns as criteria.
Regardless the usage of Marcelo's or my solution, you should consider to limit the ranges used as they drain unnecessary calculation time.

You're only partly right.

One should never use references to entire columns in SUMPRODUCT because this function will do the comparisons across all rows (1048576 rows in Excel 2007 or higher).

On the other hand, in the case of COUNTIF(s), AVERAGEIF(s) or SUMIF(s) references to entire columns do not cause detriment in performance. Such functions are smart enough to handle only rows that contain data. That's why Labamba32 observed a great improvement in performance using COUNTIFS instead of SUMPRODUCT.

M.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,845
Members
449,051
Latest member
excelquestion515

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