ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   compare two lists in two workbooks (https://www.excelbanter.com/excel-programming/277512-compare-two-lists-two-workbooks.html)

GUS

compare two lists in two workbooks
 
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).



Tom Ogilvy

compare two lists in two workbooks
 
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.

--
Regards,
Tom Ogilvy


gus wrote in message
...
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).






All times are GMT +1. The time now is 09:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com