View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default Finding unique data between 2 columns

One way, via non-array formulas ..

A sample construct is available at:
http://cjoint.com/?ccdO3RQFok
Finding unique data between 2 cols_Joshua_wks.xls

Source data in cols A and B, from row1 down as posted

In D1:
=IF(ISERROR(SMALL(E:E,ROW(A1))),"",
INDEX(A:A,MATCH(SMALL(E:E,ROW(A1)),E:E,0)))

In E1:
=IF(A1="","",IF(ISNUMBER(MATCH(A1,B:B,0)),ROW(),"" ))

In F1:
=IF(ISERROR(SMALL(G:G,ROW(A1))),"",
INDEX(A:A,MATCH(SMALL(G:G,ROW(A1)),G:G,0)))

In G1:
=IF(A1="","",IF(ISNUMBER(MATCH(A1,B:B,0)),"",ROW() ))

Select D1:G1, fill down until the last row of data in col A

Col D returns items common to both cols A and B
Col F returns items in col A not found in col B
(Results will be neatly bunched at the top)

In H1:
=IF(ISERROR(SMALL(I:I,ROW(A1))),"",
INDEX(B:B,MATCH(SMALL(I:I,ROW(A1)),I:I,0)))

In I1:
=IF(B1="","",IF(ISNUMBER(MATCH(B1,A:A,0)),"",ROW() ))

Select H1:I1, fill down until the last row of data in col B

Col H returns items in col B not found in col A
(Results will be neatly bunched at the top)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Joshua" wrote in message
...
I have a spread sheet as such:

column 1 column 2

a a
b b
c e
d

What I need to do is compare the 2 columns and figure out which entries

are
unique to both columns and which are only in column1 or column 2. The

data
will be alphanumeric.