Hi everyone!
I need help trying to figure out how to reference multiple cells in a table. I thought it would be simple so I'm either overthinking it or it is more complicated than I thought.
I have a table of data from NHL games as follows:
The table is much longer and contains many more games form various teams but this gives you the idea.
Date Away AwayScore RW/OT HomeScore Home Dec 01 Dallas 2 OT 3 Minnesota Dec 01 Edmonton 3 RW 2 Vancouver Dec 03 Dallas 1 RW 5 Winnipeg Dec 04 Ottawa 5 RW 2 Edmonton
Elsewhere I want to collect that data. So far it looks like this:
GP HomeGP AwayGP RW HomeRW AwayRW L10 RW W/OTL HomeW/OTL AwayW/OTL Edmonton 2 1 1 0 Dallas 2 0 2 0
The Games Played (GP) column is simply =HomeGP+AwayGP.
The HomeGP and AwayGP are the first ones that needed to reference the game data. To do so I did:
=SUM(IF(Table1[Home]="Edmonton", 1, 0))
This is what I want because it's adding 1 to HomeGP each time I enter a game in which Edmonton plays at home. I did the same for AwayGP.
Where I am having issues is the following columns. Under Regulation Wins (RW) I want it to be able to add 1 any time Edmonton plays a game and their score is higher than the opponents. So if the score of the referenced team is larger than the score of the other team, return one. What I tried was:
=SUM(IF(AND(Table1[Away]="ARI", OR(Table1[AwayScore]>Table1[HomeScore], Table1[HomeScore]>Table1[AwayScore])), 1, 0))
This obviously didn't work, it just returns 0. I can't figure out a way to do this and if anyone has ideas I would be really grateful!
Bookmarks