Wins + Losses for Sports Teams at Different Points

alex58392

New Member
Joined
Jun 2, 2019
Messages
2
Hi all,
First time posting and looking for some help regarding a set of sports statistics. I am looking to analyze the effect of home court advantage in the 2018-2019 season and wanted to be able to control for how many wins each team has at a certain time in the season. I currently have a set of 1230 games. Each row has the score of the game for the away team and the home team along with neighboring columns stating the identity of the home team and the away team. I was wondering if it is possible to create a formula that can analyze the scores of each game and which team they correspond to so as to calculate a sort of "running wins and losses total" that borders each game played. For example, if the Golden State Warriors have played 6 games and won 5 of them, I would like the row indicating their seventh game to have 5 wins next to it so I can attempt to control for individual team performance (a better team wins more games) in regressing for home court advantage. Thank you in advance for any help, please let me know if you have any questions. Thanks!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
please you post a small sample and desired output of the data here
 
Upvote 0
ROAD TEAMHOME TEAMAway Points ScoredHome Points ScoredDifferenceAway Days RestHome Days RestAttend.Away 3IN4-B2BAway B2BAway 3IN4Away 1Away 2Away 3MoreHome 3IN4-B2BHome B2BHome 3IN4Home 1Home 2Home 3More
10/16/18Philadelphia 76ersBoston Celtics87105183More3More18624000001000001
10/16/18Oklahoma City ThunderGolden State Warriors10010883More3More19596000001000001
10/17/18Milwaukee BucksCharlotte Hornets113112-13More3More17889000001000001
10/17/18Brooklyn NetsDetroit Pistons10010333More3More20332000001000001
10/17/18New Orleans PelicansHouston Rockets131112-193More3More18055000001000001
10/17/18Memphis GrizzliesIndiana Pacers83111283More3More17923000001000001
10/17/18Denver NuggetsLos Angeles Clippers10798-93More3More19068000001000001
10/17/18Atlanta HawksNew York Knicks107126193More3More18249000001000001
10/17/18Miami HeatOrlando Magic10110433More3More19191000001000001
10/17/18Dallas MavericksPhoenix Suns100121213More3More18055000001000001
10/17/18Utah JazzSacramento Kings123117-63More3More17583000001000001
10/17/18Minnesota TimberwolvesSan Antonio Spurs10811243More3More18354000001000001
10/17/18Cleveland CavaliersToronto Raptors104116123More3More19915000001000001
10/18/18Chicago BullsPhiladelphia 76ers108127193More120302000001000100
10/18/18Los Angeles LakersPortland Trail Blazers11912893More3More19996000001000001
10/18/18Miami HeatWashington Wizards113112-1B2B3More20409010000000001
10/19/18New York KnicksBrooklyn Nets10510721117732000100000100
10/19/18Oklahoma City ThunderLos Angeles Clippers92108162114816000010000100
10/19/18Atlanta HawksMemphis Grizzlies117131141117019000100000100
10/19/18Indiana PacersMilwaukee Bucks101118171117341000100000100
10/19/18Cleveland CavaliersMinnesota Timberwolves12313181118978000100000100
10/19/18Sacramento KingsNew Orleans Pelicans129149201118337000100000100
10/19/18Charlotte HornetsOrlando Magic12088-321117668000100000100
10/19/18Boston CelticsToronto Raptors101113122119800000010000100
10/19/18Golden State WarriorsUtah Jazz124123-12118306000010000100
10/20/18Detroit PistonsChicago Bulls118116-22121289000010000100
10/20/18Minnesota TimberwolvesDallas Mavericks13614043IN4-B2B220205100000000010
10/20/18Phoenix SunsDenver Nuggets91119282219592000010000010
10/20/18Brooklyn NetsIndiana Pacers103132293IN4-B2B3IN4-B2B17007100000100000
10/20/18Houston RocketsLos Angeles Lakers124115-92118997000010000100
10/20/18Charlotte HornetsMiami Heat113112-13IN4-B2B3IN419600100000001000
10/20/18Boston CelticsNew York Knicks112101-11B2B3IN4-B2B19427010000100000
10/20/18Orlando MagicPhiladelphia 76ers11511613IN4-B2B120300100000000100
10/20/18San Antonio SpursPortland Trail Blazers108121132119461000010000100
10/20/18Toronto RaptorsWashington Wizards117113-43IN4-B2B116185100000000100
10/21/18Atlanta HawksCleveland Cavaliers133111-221119432000100000100
10/21/18Golden State WarriorsDenver Nuggets9810021B2B19520000100010000
10/21/18Houston RocketsLos Angeles Clippers1121153B2B116149010000000100
10/21/18Sacramento KingsOklahoma City Thunder131120-111118203000100000100

<colgroup><col width="65" span="21" style="width: 65pt;"></colgroup><tbody>
</tbody>

Here is a subset of the data, I would like to create two new columns, one containing the number of cumulative wins for the specific home team playing and another for the away team. If it is easier, I can reorient the data so that it is in alphabetical order by data (to group the same home and away teams together). Please let me know if this is better.
 
Upvote 0
have a look if this is what you're after


Book1
ABCDEFVW
1ROAD TEAMHOME TEAMAway Points ScoredHome Points ScoredDifferenceAway Days RestHOME winsAWAY wins
210/16/18Philadelphia 76ersBoston Celtics871051801
310/16/18Oklahoma City ThunderGolden State Warriors100108801
410/17/18Milwaukee BucksCharlotte Hornets113112-110
510/17/18Brooklyn NetsDetroit Pistons100103301
610/17/18New Orleans PelicansHouston Rockets131112-1910
710/17/18Memphis GrizzliesIndiana Pacers831112801
810/17/18Denver NuggetsLos Angeles Clippers10798-910
910/17/18Atlanta HawksNew York Knicks1071261901
1010/17/18Miami HeatOrlando Magic101104301
1110/17/18Dallas MavericksPhoenix Suns1001212101
1210/17/18Utah JazzSacramento Kings123117-610
1310/17/18Minnesota TimberwolvesSan Antonio Spurs108112401
1410/17/18Cleveland CavaliersToronto Raptors1041161201
1510/18/18Chicago BullsPhiladelphia 76ers1081271901
1610/18/18Los Angeles LakersPortland Trail Blazers119128901
1710/18/18Miami HeatWashington Wizards113112-110
1810/19/18New York KnicksBrooklyn Nets105107201
1910/19/18Oklahoma City ThunderLos Angeles Clippers921081601
2010/19/18Atlanta HawksMemphis Grizzlies1171311401
2110/19/18Indiana PacersMilwaukee Bucks1011181701
2210/19/18Cleveland CavaliersMinnesota Timberwolves123131801
2310/19/18Sacramento KingsNew Orleans Pelicans1291492001
2410/19/18Charlotte HornetsOrlando Magic12088-3211
2510/19/18Boston CelticsToronto Raptors1011131202
2610/19/18Golden State WarriorsUtah Jazz124123-110
2710/20/18Detroit PistonsChicago Bulls118116-210
2810/20/18Minnesota TimberwolvesDallas Mavericks136140401
2910/20/18Phoenix SunsDenver Nuggets911192801
3010/20/18Brooklyn NetsIndiana Pacers1031322902
3110/20/18Houston RocketsLos Angeles Lakers124115-910
3210/20/18Charlotte HornetsMiami Heat113112-120
3310/20/18Boston CelticsNew York Knicks112101-1111
3410/20/18Orlando MagicPhiladelphia 76ers115116102
3510/20/18San Antonio SpursPortland Trail Blazers1081211302
3610/20/18Toronto RaptorsWashington Wizards117113-410
3710/21/18Atlanta HawksCleveland Cavaliers133111-2210
3810/21/18Golden State WarriorsDenver Nuggets98100212
3910/21/18Houston RocketsLos Angeles Clippers112115312
4010/21/18Sacramento KingsOklahoma City Thunder131120-1110
Sheet2
Cell Formulas
RangeFormula
V2=SUMPRODUCT(--($B$2:B2=B2),--($F$2:F2<0))
W2=SUMPRODUCT(--($C$2:C2=C2),--($F$2:F2>0))
 
Upvote 0

Forum statistics

Threads
1,214,547
Messages
6,120,139
Members
448,948
Latest member
spamiki

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