Search 2 excel files for match and dups

excelnovic

New Member
Joined
Feb 25, 2009
Messages
1
Hello friends,

I am in desperate need for help with a macro (just beginning to learn to write them).

I have an excel file (COMP1) which has several hundred rows (records), with 12 columns each. The other excel file (COMP2) has 20+ worksheets with the same number of columns. One or more of the worksheets in COMP2 may have records that are identical to COMP1. I would like a macro that reads reach row in COMP1, and looks for match in COMP2. I would like it report DUPLICATES (record every occurrence after the first one) or if NO MATCH FOUND (write the record that was not found), preferably on a different worksheet. I have some 40+ COMP1 files to process.

Can someone kindly help me with this?

Thank you very much in advance as this will save me hours of error-prone work.

Sam.
 
Last edited:

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,608
Messages
5,765,400
Members
425,282
Latest member
Nibblesy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top