Compare the same column in 2 workbooks(Excel 2003 SP3)

steveh
SilverLounger
Posts: 1952
Joined: 26 Jan 2010, 12:46
Location: Nr. Heathrow Airport

Compare the same column in 2 workbooks(Excel 2003 SP3)

Post by steveh »

Good afternoon

I have 2 workbooks Book1 and Book2. Both have town names in column C starting at row 6, Book1 ends at row 1434 and Book2 ends at row 1491.

I would like to be able to compare both columns to identify which town names are in Book2 that are not in Book1 and then append Columns A, B and C from Book2 to the row 1435 etc in Book1

Any ideas please?
Steve
http://www.freightpro-uk.com" onclick="window.open(this.href);return false;
“Tell me and I forget, teach me and I may remember, involve me and I learn.”
― Benjamin Franklin

User avatar
HansV
Administrator
Posts: 78568
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Compare the same column in 2 workbooks(Excel 2003 SP3)

Post by HansV »

Use an empty column in the second (more complete) sheet.
In row 5, enter a tile such as Missing.
In row 6, enter the following formula, substituting the appropriate names:

=ISERROR(MATCH(C6,'[Book1.xls]Sheet1'!$C$6:$C$1434,0))

Added: fill the formula down to row 1491.
Turn on autofilter for this column.
Click on the dropdown arrow in C5 and set it to show only the TRUE values.
Select columns A to C in the filtered rows.
Copy, then switch to the first sheet and paste below the existing data.
Last edited by HansV on 07 Jul 2010, 17:26, edited 1 time in total.
Reason: to add omitted essential step.
Best wishes,
Hans

steveh
SilverLounger
Posts: 1952
Joined: 26 Jan 2010, 12:46
Location: Nr. Heathrow Airport

Re: Compare the same column in 2 workbooks(Excel 2003 SP3)

Post by steveh »

Hi Hans

Thank you as usual for your very prompt response. Unfortunately I seem to have mis-interpreted the solution because when I apply the filter I only get false and not a true selection. In the screenshot you can see the formula, the F was added by Excel itself (both books or on a USB drive. F)

Can you spot what I have done wrong here?
You do not have the required permissions to view the files attached to this post.
Steve
http://www.freightpro-uk.com" onclick="window.open(this.href);return false;
“Tell me and I forget, teach me and I may remember, involve me and I learn.”
― Benjamin Franklin

User avatar
HansV
Administrator
Posts: 78568
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Compare the same column in 2 workbooks(Excel 2003 SP3)

Post by HansV »

Oops, I forgot one essential step: fill the formula down from row 6 to row 1491 (the last filled row). Then filter.

Sorry about that!
Best wishes,
Hans

steveh
SilverLounger
Posts: 1952
Joined: 26 Jan 2010, 12:46
Location: Nr. Heathrow Airport

Re: Compare the same column in 2 workbooks(Excel 2003 SP3)

Post by steveh »

Hi Hans

Even an idiot like me should have realised that, doh!! :-)
Steve
http://www.freightpro-uk.com" onclick="window.open(this.href);return false;
“Tell me and I forget, teach me and I may remember, involve me and I learn.”
― Benjamin Franklin

steveh
SilverLounger
Posts: 1952
Joined: 26 Jan 2010, 12:46
Location: Nr. Heathrow Airport

Re: Compare the same column in 2 workbooks(Excel 2003 SP3)

Post by steveh »

HansV wrote:Oops, I forgot one essential step: fill the formula down from row 6 to row 1491 (the last filled row). Then filter.

Sorry about that!
Hi Hans

As my grandkids say, sweet. Fantastic as usual

Cheers
Steve
http://www.freightpro-uk.com" onclick="window.open(this.href);return false;
“Tell me and I forget, teach me and I may remember, involve me and I learn.”
― Benjamin Franklin