Two arrays same?

  • Thread starter Thread starter FARAZ QURESHI
  • Start date Start date
Try one of these:

=SUMPRODUCT(--(A1:J1=A10:J10))=10

Or, array entered** :

=AND(A1:J1=A10:J10)

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.
 
Hello,

Biff already provided two solutions.

But if you need to be a little bit more tolerant with regards to text
& numbers, for example if the text 2 should be treated as being
identical to the number 2 then use
=SUMPRODUCT(--(EXACT(A1:J1,A10:J10)))=10

Regards,
Bernd
 
I would write the SUMPRODUCT formula this way...

=SUMPRODUCT(--(A1:J1<>A10:J10))=0

That way, you will not have to remember to adjust the 10 to reflect the
number of cells in a range (in case this formula gets used elsewhere on
ranges containing different numbers of cells).
 
You could do this and still maintain the intuitive logic (are the cells
*equal*):

=SUMPRODUCT(--(A1:J1=A10:J10))=COLUMNS(A1:J1)

My preference would be the array formula.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top