Well, you can use SUMPRODUCT
:
=SUMPRODUCT((C2:C555=D2:D555)*(C2:C555=E2:E555))
C2:C555=D2:D555
checks whether each cell in C2:C555
is equal to the corresponding cell in D2:D555
and returns an array of TRUE
and/or FALSE
.
C2:C555=E2:E555
does the same thing, but with columns C and E.
Multiplication of TRUE
and FALSE
values give an array (another array) of 1s and 0s where only TRUE*TRUE
gives 1.
SUMPRODUCT
then sums each of the individual 1s and 0s. You can use SUM
instead, but it would require array formula entry (i.e. Press Ctrl+Shift+Enter for it to work properly).