"differential" comparison

M

Micro

I have 2 sheets:
the 1st contains 2 columns as follows

A B
io tu
ei ae
ze ro
wa sw
qu kl


the 2nd contains 2 columns which show data both equal and different with
respect to those listed in the 1st sheet

D E
ei ae
wa sw
tr df
xz aq
qu kl

Does it exist a function that allows, in each sheet, to select and retrieve
all data NOT IN COMMON in the two sheets?

i.e. results:

Sheet 1 Sheet 2

A B D E
io tu tr df
ze ro xz aq


Many thanks!
 
M

Max

One way to try ..

In Sheet1, you have in A1:B5
--------
io tu
ei ae
ze ro
wa sw
qu kl

In Sheet2, you have in D1:E5
--------
ei ae
wa sw
tr df
xz aq
qu kl

In Sheet1
---------
Put in the formula bar for C1, array-enter (press Ctrl+Shift+Enter):
=IF(ISNUMBER(MATCH(A1&"_"&B1,Sheet2!$D$1:$D$100&"_"&Sheet2!$E$1:$E$100,0)),"
",ROW())

Put in D1 (normal ENTER will do):
=(IF(ISERROR(SMALL($C:$C,ROWS($A$1:A1))),"",INDEX(A:A,MATCH(SMALL($C:$C,ROWS
($A$1:A1)),$C:$C,0))))

Copy D1 across to E1
Select C1:E1, fill down to B5

Cols D & E will yield the desired results, all bunched neatly at the top:

io tu
ze ro

In Sheet2
---------
Put in the formula bar for F1, array-enter (press Ctrl+Shift+Enter):
=IF(ISNUMBER(MATCH(D1&"_"&E1,Sheet1!$A$1:$A$100&"_"&Sheet1!$B$1:$B$100,0)),"
",ROW())

Put in G1 (normal ENTER will do):
=(IF(ISERROR(SMALL($F:$F,ROWS($D$1:D1))),"",INDEX(D:D,MATCH(SMALL($F:$F,ROWS
($D$1:D1)),$F:$F,0))))

Copy G1 across to H1
Select F1:H1, fill down to H5

Cols G & H will yield the desired results, all bunched neatly at the top:

tr df
xz aq

Adapt the ranges to suit ..
 

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

Top