Vlookup search multiple columns

I have the following table

COLUMN A COLUMN B COLUMN C COLUMN D IS COLUMN A+B EXACTLY EQUALS TO C+D
A B C D NO
X Y X Y YES
word1 word2 word1 word2 YES

Is it possible to display NO or YES as in the 5th column of the table above ?

I already tried to use VLOOKUP like this “=VLOOKUP(A2:B2;C2:D2;1;1)” but it doesn’t works :frowning:

EDIT : I put a wrong title, I didnt want to say “contains” but “is exactly equals to”, I edited the title

Can you add two auxiliary columns with CONCAT?

Not using Vlookup but Match. Once again someone will have a more elegant or succinct solution.
Match82861.ods (11.2 KB)

BTW your sample does not have a match in it as cell C3 contains X[SPACE] issues with Firefox or site crashing tab so assume copying problem too.

1 Like

Yes, it’s almost this ! :slight_smile:

I corrected the title of my post, I want it to be exactly equals and not the same just in another order, it has be the same order. So X Y not equals to Y X. Sorry for the confusion.

Following @EarnestAl formula (answer is his):
E2: =IF(ISERROR(AND(MATCH(A2;C2;0);MATCH(B2;D2;0)));"NO";"YES")

I think this is simpler. If you can stand having TRUE & FALSE instead, have =AND(A2=C2,B2=D2)

If you need YES and NO then =IF(AND(A2=C2,B2=D2),"YES","NO")

1 Like

Rather apply a user defined number format [=0]"NO";"YES"
That way the 1 and 0 of TRUE and FALSE can still be calculated with.

4 Likes