Hello,
1st time poster here. I am trying to create a countif or a sumproduct which: 1) recognizes which column it needs to count from, and then counts based upon if the entry in that column meets another criteria. So in this example, cell B3 would look at all of Row 1, find 'Tom' in Column E, and then return a Count from that Column where E:E = D:D. So since E2 = D2, E3 = D3, and E4 = D4, it returns a count of 3. But for B4 ('Jack'), it only returns a count of 1 because Column G only contains 1 worthy instance (where G2 = D2).
I should also note that in the example everything is on the same worksheet. But in practicality Columns A & B are on Worksheet 1 and Columns D-H are on Worksheet 2. However I assume the underlying logic would still be the same? If possible, I would like to avoid using array formulas.
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Person[/TD]
[TD]Count of Matching Fruit[/TD]
[TD][/TD]
[TD]Fruit to Match[/TD]
[TD]Tom[/TD]
[TD]Bob[/TD]
[TD]Jack[/TD]
[TD]Jill[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Tom[/TD]
[TD]3[/TD]
[TD][/TD]
[TD]Apple[/TD]
[TD]Apple[/TD]
[TD]Grape[/TD]
[TD]Apple[/TD]
[TD]Grape[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Bob[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]Orange[/TD]
[TD]Orange[/TD]
[TD]Orange[/TD]
[TD]Kiwi[/TD]
[TD]Orange[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Jack[/TD]
[TD]1[/TD]
[TD][/TD]
[TD]Pear[/TD]
[TD]Pear[/TD]
[TD]Pear[/TD]
[TD]Watermelon[/TD]
[TD]Pear[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Jill[/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
1st time poster here. I am trying to create a countif or a sumproduct which: 1) recognizes which column it needs to count from, and then counts based upon if the entry in that column meets another criteria. So in this example, cell B3 would look at all of Row 1, find 'Tom' in Column E, and then return a Count from that Column where E:E = D:D. So since E2 = D2, E3 = D3, and E4 = D4, it returns a count of 3. But for B4 ('Jack'), it only returns a count of 1 because Column G only contains 1 worthy instance (where G2 = D2).
I should also note that in the example everything is on the same worksheet. But in practicality Columns A & B are on Worksheet 1 and Columns D-H are on Worksheet 2. However I assume the underlying logic would still be the same? If possible, I would like to avoid using array formulas.
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Person[/TD]
[TD]Count of Matching Fruit[/TD]
[TD][/TD]
[TD]Fruit to Match[/TD]
[TD]Tom[/TD]
[TD]Bob[/TD]
[TD]Jack[/TD]
[TD]Jill[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Tom[/TD]
[TD]3[/TD]
[TD][/TD]
[TD]Apple[/TD]
[TD]Apple[/TD]
[TD]Grape[/TD]
[TD]Apple[/TD]
[TD]Grape[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Bob[/TD]
[TD]2[/TD]
[TD][/TD]
[TD]Orange[/TD]
[TD]Orange[/TD]
[TD]Orange[/TD]
[TD]Kiwi[/TD]
[TD]Orange[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Jack[/TD]
[TD]1[/TD]
[TD][/TD]
[TD]Pear[/TD]
[TD]Pear[/TD]
[TD]Pear[/TD]
[TD]Watermelon[/TD]
[TD]Pear[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Jill[/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]