1

I need to compare columns C and D with A and B and only if exist same combination of two cells in one row. Hope the image below will explain the situation better.

Image of example data

2
  • Do the matches have to be on the same row or can they be on any row in the two columns? Nov 4, 2014 at 12:07
  • In the same row
    – PaulB.
    Nov 4, 2014 at 13:24

3 Answers 3

2

In E1 you can put

=IF(AND(C1=A1,D1=B1),"exist","")

and drag it down.

1
  • what if order is not same and some values missing ,so this wont apply
    – Tokci
    Mar 3, 2021 at 6:00
0

See below (I put in the row 1 header line, after I took the screenshot, but you get the idea)

1) move Column C & D over to D & E

2) in C1 put in =A1 & B1

3) Same for now Column D & E

so in F1 put in =D1 & E1

4) next in G1 put in =IF(ISERROR(VLOOKUP(F1,$C$1:$C$100,1,FALSE)),"","exists")

Then drag G1 down to the bottom of your columns. Change $C$1:$C$100 to your range before you change

You can then also hide Column C & F as you don't need them visible

enter image description here

1
  • Thank you, it's good idea, but I don't get correct results, I'll try to work on this because of not so simple input data
    – PaulB.
    Nov 4, 2014 at 13:26
0
VLOOKUP(CONCATENATE(D2,E2),CONCATENATE(A2:A8,B2:B8),1,0)
1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Sep 13, 2022 at 10:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .