View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Daniel.C Daniel.C is offline
external usenet poster
 
Posts: 43
Default Match 2 columns to 2 columns in different worksheets

Somewhere on row 1 :
names matches (array formula, validate with CTRL+Shift+Enter) :
=IF(LARGE(IF(ISNA(MATCH(Sheet2!$A$1:$A$15,Sheet1!$ A$1:$A$15,0)),0,MATCH(Sheet2!$A$1:$A$15,Sheet1!$A$ 1:$A$15,0))*IF(ISNA(MATCH(Sheet2!$B$1:$B$15,Sheet1 !$B$1:$B$15,0)),0,1),ROW())0,INDEX(Sheet1!$A$1:$A $10,LARGE(IF(ISNA(MATCH(Sheet2!$A$1:$A$15,Sheet1!$ A$1:$A$15,0)),0,MATCH(Sheet2!$A$1:$A$15,Sheet1!$A$ 1:$A$15,0))*IF(ISNA(MATCH(Sheet2!$B$1:$B$15,Sheet1 !$B$1:$B$15,0)),0,1),ROW())),"")
first names matches on row1 too and array formula too :
=IF(LARGE(IF(ISNA(MATCH(Sheet2!$A$1:$A$15,Sheet1!$ A$1:$A$15,0)),0,MATCH(Sheet2!$A$1:$A$15,Sheet1!$A$ 1:$A$15,0))*IF(ISNA(MATCH(Sheet2!$B$1:$B$15,Sheet1 !$B$1:$B$15,0)),0,1),ROW())0,INDEX(Sheet1!$B$1:$B $10,LARGE(IF(ISNA(MATCH(Sheet2!$A$1:$A$15,Sheet1!$ A$1:$A$15,0)),0,MATCH(Sheet2!$A$1:$A$15,Sheet1!$A$ 1:$A$15,0))*IF(ISNA(MATCH(Sheet2!$B$1:$B$15,Sheet1 !$B$1:$B$15,0)),0,1),ROW())),"")
Drag down as needed
PS : I used A1:B15 ranges on both sheets. Adjust to your needs. You should
choose the greatest range.
PPS : There should be a simpler formula but I cannot figuree it out.
--
Regards.
Daniel
"Mally" a écrit dans le message de news:
...
Also there could be different numbers of rows in the two worksheets.

e.g. 200 rows in worksheet 1 but 5000 in worksheet 2.

"Mally" wrote:

Worksheet1
I have a list of surnames in column A and a list of first names in column
B.

Worksheet2
I have a list of surnames in column A and a list of first names in column
B.

How do I show if there is any matches in BOTH the surnames and first
names
in both worksheets i.e. it displays MATCH in a column.

I have tried using VLOOKUP tables but have been unsuccessful.