courtney27
New Member
- Joined
- Dec 17, 2014
- Messages
- 12
Hello,
I am trying to write a sum product formula that also includes an OR statement. The value I would like to return is a MatchID based on a Season, Round and Team, however the Team could be one of 2 teams - hence the need for an OR statement. Please see below an example of my data for both the reference table and the sum product table with column references above. Both tables have the same number of rows (1048576).
A C D G
Season Round MatchID Team
2003 16 ? EFC
2004 17 ? BFC
2005 3 ? CFC
V W Y Z AD
Season Round Team1 Team2 MatchID
2003 16 COFC EFC 5
2004 17 BFC PAFC 10
2005 3 FRFC CFC 9
Here is what I have tried so far (which returns a "0"). I read on a forum that the "+" could be used to simulate the "OR".
=SUMPRODUCT(V2:V1048576=A2)*(W2:W1048576=C2)*(Y2:Y1048576=G2)+(Z2:Z1048576=G2)*(AD2:AD1048576)
Please let me know where I am going wrong and any suggestions for getting the right answer. Thank you for your help.
I am trying to write a sum product formula that also includes an OR statement. The value I would like to return is a MatchID based on a Season, Round and Team, however the Team could be one of 2 teams - hence the need for an OR statement. Please see below an example of my data for both the reference table and the sum product table with column references above. Both tables have the same number of rows (1048576).
A C D G
Season Round MatchID Team
2003 16 ? EFC
2004 17 ? BFC
2005 3 ? CFC
V W Y Z AD
Season Round Team1 Team2 MatchID
2003 16 COFC EFC 5
2004 17 BFC PAFC 10
2005 3 FRFC CFC 9
Here is what I have tried so far (which returns a "0"). I read on a forum that the "+" could be used to simulate the "OR".
=SUMPRODUCT(V2:V1048576=A2)*(W2:W1048576=C2)*(Y2:Y1048576=G2)+(Z2:Z1048576=G2)*(AD2:AD1048576)
Please let me know where I am going wrong and any suggestions for getting the right answer. Thank you for your help.