0

This is a doubt that arose in my workplace, and it should be pretty straightforward.

We have two columns of numbers, say:

1 1
1 2
2 1
2 2

And we want to get the number of rows that have equal numbers (2), without a helping column for each comparison. We can't get a working matrix operation (wich is the way we think correct). Any ideas?

Thanks in advance!

0

2 Answers 2

1

Three more to pile on here:

Condensed array function:

  1. {=SUM(--(A1:A10=B1:B10))}

Same function, but wrapped in a SUMPRODUCT rather than an array function:

  1. =SUMPRODUCT(--(A1:A10=B1:B10))

Ignores blanks:

  1. =SUMPRODUCT(--(A1:A10=B1:B10)*NOT(A1:A10="")*NOT(B1:B10=""))
Sign up to request clarification or add additional context in comments.

1 Comment

Great! I moved the accepted answer from mine to yours because I kind-of despise array functions :) Thanks for this info!
1

We got it using:

{=SUM(IF(A1:A10=B1:B10;1;0))}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.