sumproduct with 2 vertical columns

rangelsammon

New Member
Joined
Sep 14, 2022
Messages
9
Office Version
  1. 365
Platform
  1. Windows
If anyone could assist. this would be awesome. i have been stuck on this problem for 2 days. cant figure it out. i think i might need a "helper" column but i want to try to avoid and dont want to use offset columns by numbers.

link to sheet too for editing


count if
if a column J (Win) cell contains "yes"
then check column D (inning) and see which inning that "yes" occurred
if column F (ball in hand) contains "yes"
then check column D (inning) and see which inning that "yes" occurred
if those 2 occurred in the same inning then count
only count if happened by the same player (column C) & if in the same match (column A)
to the left the answer should be 1 for john
but if I change cell b9 to 2 then the answer should be 2 for john

A​
B​
C​
D​
E​
F​
G​
H​
I​
J​
1​
rackplayerinningsafetyball in handmademissfoulwin
2​
4​
2​
john
2​
yesyes
3​
4​
2​
john
2​
yes
4​
4​
2​
john
2​
yesyes
5​
4​
2​
rick
1.5​
yes
6​
4​
2​
john
1​
yes
7​
4​
2​
rick
0.5​
yes
8​
4​
2​
john
0​
yes
9​
4​
1​
john
2​
yesyes
10​
4​
1​
rick
1.5​
yes
11​
4​
1​
john
1​
yes
 
heres my attempt at it as this formula may explain better
=SUMPRODUCT((data[match]=4)*(data[player]=Player1)*(data[win]="yes")*(data[ball in hand]="yes")*(data[inning]=INDEX(data[inning],MATCH("yes",data[ball in hand]))=INDEX(data[inning],MATCH("yes",data[win]))))

whenever the inning matches the yes in column win & column ball in hand then that is true and therefore count how many times this happens during a match by a player
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
heres my attempt at it as this formula may explain better
=SUMPRODUCT((data[match]=4)*(data[player]=Player1)*(data[win]="yes")*(data[ball in hand]="yes")*(data[inning]=INDEX(data[inning],MATCH("yes",data[ball in hand]))=INDEX(data[inning],MATCH("yes",data[win]))))

whenever the inning matches the yes in column win & column ball in hand then that is true and therefore count how many times this happens during a match by a player
player1 is john
 
Upvote 0
Unfortunately this is far more complex than I thought (unless I'm overthinking it), so not sure I can supply an answer.
Hopefully somebody else can figure it out.
thank you again for reaching out
 
Upvote 0

Forum statistics

Threads
1,215,593
Messages
6,125,715
Members
449,254
Latest member
Eva146

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