Record versus Group

bet1734

New Member
Joined
Mar 6, 2020
Messages
7
Office Version
  1. 2016
Platform
  1. Windows
Hi everybody

I am trying to figure out a method for showing the record a team has against a certain group of teams.

In the below, I have Teams A-D with their corresponding group in a table, West (Teams A & B) or East (Teams C & D). I also have 12 mock games listed between these teams, Home Team in column A, Away Team in B, Home Score in C, and Away Score in D.

I want to show all the times team A won against the East (teams C & D). I broke it down in columns F-H where I manually examinded the results of the game and entered a yes if the instance was true. Column F is for all the games a team from the East played (8 games). G is when team A played the East teams (4 games). H is when A beat the Eastern teams (3 games). Therefore, I would like to report that total value "3" in the corresponding table.

I know there's got to be a way to automate this somehow. The larger sheet has over a thousand games so I would prefer not to have to manually count each time, especially since more data will be entered. I thought about using a sumproduct function to somehow lookup the 3 parts but that hasn't yielded any positive results so far.

Appreciate any ideas you might have!

NHL.xlsx
ABCDEFGHIJKLM
1HomeAwayHSASEast PlaysA vs East Win vs EastTeamGroup
2AB23NoNoNoAWest
3AC51YesYesYesBWest
4AD34YesYesYesCEast
5BA13NoNoNoDEast
6BC32YesNoNo
7BD35YesNoNoTeamEastWest
8CA41YesYesNoA3
9CB32YesNoNoB
10CD10YesNoNoC
11DA45YesYesYesD
12DB14YesNoNo
13DC21YesNoNo
14843
15
16
Sheet1
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
How about

+Fluff New.xlsm
ABCDEIJKL
1HomeAwayHSASTeamGroup
2AB23AWest
3AC51BWest
4AD34CEast
5BA13DEast
6BC32
7BD35TeamEastWest
8CA41A21
9CB32B21
10CD10C12
11DA45D12
12DB14
13DC21
14
Data
Cell Formulas
RangeFormula
K8:L11K8=SUMPRODUCT(($A$2:$A$13=$J8)*($C$2:$C$13>$D$2:$D$13)*(VLOOKUP($B$2:$B$13,$J$2:$K$5,2,0)=K$7))+SUMPRODUCT(($B$2:$B$13=$J8)*($D$2:$D$13>$C$2:$C$13)*(VLOOKUP($A$2:$A$13,$J$2:$K$5,2,0)=K$7))

PS H4 should be No not Yes ;)
 
Upvote 0
Curse you manual calculation!! haha thanks.

For some reason I can get the formula to work on the small example but it doesn't work when I put it on the larger sheet. I can keep messing around with it.
 
Upvote 0
Hi Fluff, bet1734,

I tried Fluff's formula on my Excel, and it did not work. A VLOOKUP inside of an array function has always been a no-no. Evidently with the new calculation engine it's OK. But for those of us stuck in the past, we can try this:

Book3
ABCDEIJKL
1HomeAwayHSASTeamGroup
2AB23AWest
3AC51BWest
4AD34CEast
5BA13DEast
6BC32
7BD35TeamEastWest
8CA41A21
9CB32B21
10CD10C12
11DA45D12
12DB14
13DC21
14TeamEastWest
15A21
16B21
17C12
18D12
Sheet3
Cell Formulas
RangeFormula
K8:L11K8=SUMPRODUCT(($A$2:$A$13=$J8)*($C$2:$C$13>$D$2:$D$13)*COUNTIFS($J$2:$J$5,$B$2:$B$13,$K$2:$K$5,K$7))+SUMPRODUCT(($B$2:$B$13=$J8)*($D$2:$D$13>$C$2:$C$13)*COUNTIFS($J$2:$J$5,$A$2:$A$13,$K$2:$K$5,K$7))
K15:L18K15=SUMPRODUCT(($A$2:$A$13=$J15)*($C$2:$C$13>$D$2:$D$13)*ISNUMBER(MATCH($B$2:$B$13&K$14,$J$2:$J$5&$K$2:$K$5,0)))+SUMPRODUCT(($B$2:$B$13=$J15)*($D$2:$D$13>$C$2:$C$13)*ISNUMBER(MATCH($A$2:$A$13&K$14,$J$2:$J$5&$K$2:$K$5,0)))


The K8 formula uses COUNTIFS instead of VLOOKUP. However, bet1734 says he has Excel 2016, which doesn't have COUNTIFS, so bet1734, try the K15 formula.
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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