A, B, C, D, 10
A, B, X, Y, 10
A, B, C, D, 20
The first sentence serves as a model. Actual data are in the later lines. On each line, I want to count how many correct values there are. The correct value is one that corresponds to the value in the template line. Hence, the second line should be three, and the third line should be four.
I tried using COUNTIF, but I couldn't come up with an expression for the condition. Since SUMPRODUCT counts all pairs of equivalent values without regard to location, it also doesn't appear to be helpful in this situation.