0

I have a sheet like below:

A     B
123    12
456    456   
11     11

I want to count the cells having the same value in column A and B. From the above example, I expect 2 (456 and 11 are both in column A and B).

Here are some formulas I tried without success:

=IF(A1:A3=B1:B3;1;0)           "Error..."
=COUNTIFS(A1:A3; "=" & B1:B3)  "Returns 0"

I don't want to use script.

Stephan
  • 41,764
  • 65
  • 238
  • 329

1 Answers1

1

Try

=SUMPRODUCT(A:A<>"", A:A=B:B)
JPV
  • 26,499
  • 4
  • 33
  • 48