Macro to compare columns from different workbooks and provide output

thelad

Board Regular
Joined
Jan 28, 2011
Messages
245
Is there a macro out there that can compare column from two different workbooks and split out the differences on a sheet. For example: This is on book 1 not on book2 and list the differences. Then underneath that , This is on book 2 not on book 1. So the macro should do the following:

  1. Allow user to select two files
  2. on the first file copy column A & B from row 2 down last used row file sheet 2 column A and B. On this sheet 2 in column C I want to concatenate A and (Formula A2&B2) 2 to last use row. This will be used as a comparison column.
  3. Go to second file the user selected and copies column A and B from row 1 down to last used row and copy into macro file sheet 2 column E and F. On this sheet 2 I column G want to concatenate E and F (formua =E2&F2) down from G2 to last used row. This will b used as the comparison column .
  4. Then I want to compare column C against column G and put differnes in sheet of macro file. It needs two way look up
  5. So for example it check what is in column C not in column G and posts in sheet 1 row 12 A t C rows where differences. If no differences it willsay no differences in row 12
  6. Then it check whats in column G not column C and post in sheet 1 underneath he previous step. If no difference will say no differences

Maybe I am complicating the steps?

Any help will be appreciated
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi,

Anyone able to see if the above is possible? I have probably made it sound more complex than what I am trying to do
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,633
Latest member
DougMo

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
Back
Top