compare two lists in two workbooks

  • Thread starter Thread starter gus
  • Start date Start date
G

gus

I have two workbooks that has almost same lists (range(a1:z18000)

some of the data are the same, and i want to transfer from the secont
workbook all the data that are not the same.
The column that i want to compare is column(2)
And if the value in workbook(1).worksheet(1).cell (a,2) it exists in target
workbook(2).worksheet(1)
do nothing.
If it doesn't then copy the entire row to the last empty row in target
workbook(1).worksheet(1).
 
in the workbook that might have additional data put in a formula like

In row 1 in an adjacent column
=if(countif([Other.xls"]Sheet1!A:A,A1)>0,"","Copy")

then drag fill that down the column.

Then apply an autofilter the data and in the dropdown for the column with
the above formula, select copy.

then select all your data and copy it to the appropriate location.

Turn on the macro recorder while you do this manually if you need code.
 
Back
Top