The following solution will do the following:

if combination A2 (Rap Placemements concatenated with Creatives from Database1) and C2 (Rappers from Database1) is found in combination B & D (same info from DB2), it will return C2

else:

if A2 can be found in C it will return the first rapper from DB where B can be found in A and the combination B&D can not be found in A&C, if such is rapper is not found or if A2 can’t be found in C, it will return “No Match”.

In F2 similar but the other way around.

**Example:**
Combinations in DB1 with results in column E

12345A A

12345B C

12346A A

12346B No Match

12347A No Match

Combinations in DB2 with results in column F

12345A A

12345C B

12345D B

12346A A

12348A No Match

Assuming you are USING Excel 2007 or higher, data from DB1 is in row 2-13 and data from DB2 is in row 2-7, enter in E2 the following array formula, confirm with CTRL-SHIFT-ENTER, not just ENTER, and copy down:

Code:

`=IF(ISNUMBER(MATCH(A2&C2,$B$2:$B$7&$D$2:$D$7,0)),C2,IFERROR(INDEX($D$2:$D$7,SMALL(IF(ISERROR(MATCH($B$2:$B$7&$D$2:$D$7,$A$2:$A$13&$C$2:$C$13,0))*($B$2:$B$7=$A2),ROW($B$2:$B$7)-ROW($B$2)+1),1)),"No Match"))`

Enter in F2 the following array formula, confirm with CTRL-SHIFT-ENTER, not just ENTER, and copy down:

Code:

`=IF(ISNUMBER(MATCH(B2&D2,$A$2:$A$13&$C$2:$C$13,0)),D2,IFERROR(INDEX($C$2:$C$13,SMALL(IF(ISERROR(MATCH($A$2:$A$13&$C$2:$C$13,$B$2:$B$7&$D$2:$D$7,0))*($A$2:$A$13=$B2),ROW($A$2:$A$13)-ROW($A$2)+1),1)),"No Match"))`

Now you can highlight differences by comparing B and E for DB1, and D and F for DB2.

**A few other remarks:**
**=ISERROR(…)=TRUE** is the same as

**=ISERROR(…)** (so the =TRUE is superfluous)

**=AND(B2=C2)** is the same as

**=B2=C2** (no AND required for 1 logical test)

Mind your fixed/mixed/variable cell references., e.g. D2:D100 will become D3:D101 when copied down. When referring to a range of multiple cells, you would typically want to have it fixed like $D$2:$D$100.