3

I have a row containing an answer key for a multiple choice exam and then below that a number of rows containing the answers from students.

A very simple question: how can I count the number of "matches" between each student response row and the answer key row?

Example:

Answer key | 1 | 2 | 1 | 1 | 4 | 3 |
Bob        | 1 | 1 | 1 | 1 | 1 | 1 | <some formula magic that would give me '3'>
Steve      | 2 | 4 | 2 | 4 | 3 | 2 | <some formula magic that would give me '0'>
Jen        | 1 | 2 | 1 | 1 | 4 | 3 | <some formula magic that would give me '6'>
1

This did the trick for me: =arrayformula(sum(B$1:G$1=B2:G4))

| improve this answer | |
1

For some reason the suggested =arrayformula(sum(B$1:G$1=B2:G4)) did not work for me.

I had to use =arrayformula(sum(if(B$1:G$1=B2:G4,1,0))).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.