sumproduct to calculate total based on non-continuous columns?

C

cpliu

If I have the following cells:
YES,NO,YES,YES,NO,YES,YES,YES
YES,YES,NO,YES,NO,YES,NO,YES
YES,NO,YES,YES,NO,YES,YES,YES
....
The first row is the right answers. I'd like to compare the other rows with the right answers and put the total that are right for columns 1, 3, 5, 7 and another total for being right in columns 2, 4, 6, and 8.
so using the example above-
Row 2: 2, 3 total correct
Row 3: 4, 4 total correct

The data is not in column and they're not continuous so I don't know how to use sumproduct to calculate.

How can I do that?

Thanks,
 
C

cpliu

Found the solution: by using multiple countIf statements I can grab the total.
eg. =COUNTIF(M4:M4,M2)+COUNTIF(R4:R4,R2)+COUNTIF(W4:W4,W2)+COUNTIF(AB4:AB4,AB2)
 
Top