Count matching values from cells across a column and a row

VanCity208

New Member
Joined
Aug 14, 2018
Messages
2
Hi,

I'm trying to count the number of occasions when a cell in a specific column matches a corresponding cell in a specific row. So, going down the column, is there a "1" in the column and a "1" in the same position while going across a row? In other words, if the first cell in the column range contains "1" AND the first cell in the row range contains "1", then it's counted. Then, if the second cell in the column range is "1" AND the second cell in the row range contains "1", then it's counted too.

I'm trying to count reciprocated nominations (in which a person nominated a co-worker and that co-worker also nominated the person). For example, Jane's nominations in column B compared to Jane's received nominations in row 2 - the first cell/intersection of column and row is zero (no self-nominations...), but I need to count when a 1 appears in B3 AND in C2, plus in B4 AND in D2, plus in B5 AND in E2. In Jane's case, she has 1 reciprocated nomination (from Billy), and this would be counted/summed(?) in B7. Note that Sue's nomination of Jane (E2) doesn't count, because Jane didn't nominate Sue (B5). Then, I'd do the same for Billy across column C and row 3 (2 reciprocated nominations), then Bobby (0 reciprocated nominations), and then Sue (1 reciprocated nomination).

ABCDE
1JaneBillyBobbySue
2Jane0101
3Billy1011
4Bobby0001
5Sue0100
6
7JaneX
8BillyY

<tbody>
</tbody>

I have to count these reciprocated nominations for larger groups (~25 people) in multiple offices, so I'd love to find a function that I could apply that would count these for me quickly. I've tried reading about several functions (Index, Match, VLookup), but I can't figure out how to apply them to my situation. So, maybe, I'm completely looking in the wrong direction. : / Any suggestions would be greatly appreciated!
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Maybe...


A
B
C
D
E
1
Jane​
Billy​
Bobby​
Sue​
2
Jane​
0​
1​
0​
1​
3
Billy​
1​
0​
1​
1​
4
Bobby​
0​
0​
0​
1​
5
Sue​
0​
1​
0​
0​
6
7
Jane​
1​
8
Billy​
2​
9
Bobby​
0​
10
Sue​
1​

<tbody>
</tbody>


Array formula in B7 copied down
=SUM(($A$2:$A$5=A7)*($B$2:$E$5=1)*TRANSPOSE($B$2:$E$5=1))
Ctrl+Shift+Enter, not just Enter

M.
 
Last edited:
Upvote 0
Thank you!! This worked beautifully, and you have saved me SO MANY hours of work. I only wish I'd asked sooner! :biggrin:

Thank you for taking the time to post an answer! I really appreciate the help!
 
Upvote 0

Forum statistics

Threads
1,214,792
Messages
6,121,612
Members
449,039
Latest member
Mbone Mathonsi

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