Playing Time Calculation

Falcane

New Member
Joined
Feb 3, 2017
Messages
10
Hi everyone - long time lurker, had an old account from years ago but lost name/password and it was tied to my old work email, so apologies for the new account...

I coach a couple elite soccer teams and I am a big nerd and use a lot of statistics and data to supplement my strategies. I'm trying a different, more automated format this year using exports from my iPad's soccer app, and I consider myself a pretty strong Excel user, but one thing has me stumped.

Below is a table I input data into, and a recent game we played indoors with 7 players a side. Columns A (Event) through E (Player In) are automatically imported, the rest is manual. The columns on the right are positions on the field; the numbers represent certain players and I manually swap player numbers in and out when there's a "Substitution" (player not listed comes on for someone) or "Change Position" (two players on swap positions). More often than not, change position + substitution happen roughly the same time because I'm moving people around based on the substitution.

Here's the important part - can anyone think of a way to count total playing time for individual players based on player number? Some kind of SUMIF, or INDEX with OFFSET, I don't know. I'm completely stumped on this one but I'm confident there's a way I can do this.

Thanks for any help.

LUrIQlR.png
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Seems difficult. You do not record who is playing at kickoff. I can also imagine that substitutions happen at halftime, but you do not record them.
The initial team of each half should be somehow inferred from the events, but I can imagine that the goalkeeper is never mentioned, even though he/she is playing all the time.

J.Ty.
 
Upvote 0
Forget my previous post, I have discovered where the info about teams is.

Look at this solution (toy size). Teams are in columns B, C, D, A is time (assuming the time is the beginning of the play of the team in this row). Yellow filed is the player, whose playing time is to be calculated.


Excel 2016 (Windows) 64 bit
ABCDEFG
100:00123303:00:00
201:30124
303:30231
404:30321
505:00
Sheet1
Cell Formulas
RangeFormula
G1=SUMPRODUCT((B1:D4=F1)*(A2:A5-A1:A4))
 
Last edited:
Upvote 0
Nice, that's pretty good. Only two concerns with that, thankfully neither are really going to prevent me from moving forward with this solution:

1. When I apply the formula to the above data set, everyone's playing time is slightly off, usually by about 1-30 seconds, not any more than that, though. Not really sure why. Trying to dissect the formula in evaluate is pretty difficult.

2. The above data set you'll see a "Game" column - so there will be more than one game. I can manually move the parameters of the SUMPRODUCT to fit each game, but there must be an automated way to do that that I'm missing.

I've uploaded a shell version of the spreadsheet (with player names and team names omitted to protect their identities as they are minors): http://jmp.sh/59qVUSC

You'll see that I have the SUMPRODUCT calculation on the second tab, and it individually adds up game time per game with manual changing of the parameters to fit each individual game.
 
Upvote 0
Concerning many games: do you want the tool to sum times from all games, one game at a time, or something else?

J.Ty.
 
Upvote 0
Eventually, both (players get report cards at the end of the year and part of that is transparency to parents over how much playing time they get). But for the sake of this calculation, ideally, a sum of all games. Only reason that table exists on the second tab is I wasn't sure if you could do one big calculation + sum of all games without having to manually add games together, if that makes sense.
 
Upvote 0
Method to work with separate games:


Excel 2016 (Windows) 64 bit
ABCDEFGH
1timegameplayer1player2player3gameplayer
200:0011232302:30:00
301:301124
403:301231
504:301321
605:001
700:002123
801:302124
903:302231
1004:302421
1105:002
Sheet1
Cell Formulas
RangeFormula
H2=SUMPRODUCT((C2:E10=G2)*(A3:A11-A2:A10)*(B2:B10=F2))
 
Upvote 0
Here is a variant summing up all games:


Excel 2016 (Windows) 64 bit
ABCDEFGH
1timegameplayer1player2player3player
200:001123304:30:00
301:301124
403:301231
504:301321
605:001
700:002123
801:302124
903:302241
1004:302421
1105:002
Sheet1
Cell Formulas
RangeFormula
H2=SUMPRODUCT((C2:E10=G2)*(A3:A11-A2:A10)*(B3:B11=B2:B10))
 
Upvote 0
Thank you very much. The second one works like a charm, but the first one (individual games) does not. It returns some negative values, and it only returns the correct value for the first game in the file I uploaded (where there was zero substitutions on/off made) if I change the third SUMPRODUCT parameter to the second row to the final row instead of the first row to the second-last row.
 
Upvote 0
UPDATE: Individual game formula works if you add the "(B2:B10=F2)" parameter as a fourth criteria to the "multi-game" formula.

Thanks for your help!!!! :)
 
Upvote 0

Forum statistics

Threads
1,222,908
Messages
6,168,967
Members
452,228
Latest member
just4jeffrey

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