An inelegant solution would be to transpose the rows into columns and then
use the VLOOKUP function. Try transpose the first row and put it in column
A, in column B put a bunch of 1's. Transpose row 2 and put it in column D.
In column E put a bunch of 1's. Then use VLOOKUP, the formula (in F1) would
look something like:
=VLOOKUP(D1,A:B,2,FALSE)
where you see a one, it's a duplicate, where you see an error, it's not.
Drag this all the way down.
Then do the same thing but with formula:
=VLOOKUP(A1,D:E,2,FALSE)
Hope this helps...