Compare two excel spread sheet with macro
You can use something like this:
Sheet3 (A2):
=IF(ISERROR(INDEX(Sheet2!$A$2:$D$1142,MATCH(Sheet2 !$B2,Sheet1!$B$2:$B$1142,0),COLUMN())),"",INDEX(Sh eet2!$A$2:$D$1142,MATCH(Sheet2!$B2,Sheet1!$B$2:$B$ 1142,0),COLUMN()))
Sheet4 (A2):
=IF(ISERROR(INDEX(Sheet2!$A$2:$D$1142,MATCH(Sheet2 !$B2,Sheet1!$B$2:$B$1142,0),COLUMN())),INDEX(Sheet 2!$A$2:$D$1142,MATCH(Sheet2!$B2,Sheet2!$B$2:$B$114 2,0),COLUMN()),"")
Copy to other cells
--
Rodrigo Ferreira
Regards from Brazil
"Lillian Lian" escreveu na mensagem
...
I have one excel spreed that has sheet1 and sheet2, both has same like this
ColumnA ColumnB ColumnC ColumnC
name SSN domain users
sheet1 has 947 records
sheet2 has 1142 records
I would like match SSN on columnB,
if they are match then move all the name, SSN, domain, users to sheet3.
if they are not match then write all the name, SSN, domain, users to
sheet4
thanks for all the help
Lillian
|