ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Compare range with another range in other workbook (https://www.excelbanter.com/excel-worksheet-functions/55494-compare-range-another-range-other-workbook.html)

Arjan

Compare range with another range in other workbook
 
I've a workbook with names in range A1:A10.
In another workbook there is a list (the length is every week different) and
I want to compare this list with the 10 names on my first worksheet.

I want a list of the people who are in that long list, but not in my default
10 names.

I started with

For Each c In Range("[document.xls]Sheet1!E1",
Range("[document.xls]Sheet1!E65535").End(xlUp))

but that doesn't work. I don't have any idea how to solve this.

Can somebody help me or is it not possible?

Regards,
Arjan


Bob Phillips

Compare range with another range in other workbook
 
I would use conditional formatting on the long list with a formula to test
if in the short list.

So assume the long list is Sheet2!A1:An, short list is Sheet1!A1:A10.

Select the long list, and in CF, add a formula of
=ISNUMBER(MATCH(A1,Sheet1!$A$1:$A$10,0)), and format with a colour on the
pattern tab.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Arjan" wrote in message
...
I've a workbook with names in range A1:A10.
In another workbook there is a list (the length is every week different)

and
I want to compare this list with the 10 names on my first worksheet.

I want a list of the people who are in that long list, but not in my

default
10 names.

I started with

For Each c In Range("[document.xls]Sheet1!E1",
Range("[document.xls]Sheet1!E65535").End(xlUp))

but that doesn't work. I don't have any idea how to solve this.

Can somebody help me or is it not possible?

Regards,
Arjan




Bruno Campanini

Compare range with another range in other workbook
 
"Arjan" wrote in message
...
I've a workbook with names in range A1:A10.
In another workbook there is a list (the length is every week different)
and
I want to compare this list with the 10 names on my first worksheet.

I want a list of the people who are in that long list, but not in my
default
10 names.

I started with

For Each c In Range("[document.xls]Sheet1!E1",
Range("[document.xls]Sheet1!E65535").End(xlUp))

but that doesn't work. I don't have any idea how to solve this.

Can somebody help me or is it not possible?

Regards,
Arjan


I have a VBA Sub which, given two ranges even in
two sheets, makes the following comparison:
A-B === elements in range A that are not in range B
B-A === elements in range B that are not in range A
A+B === elements of A plus elements of B
AB === elements that are common to A and B
Unique values only.

It is one page code. Do you think it is ok for you?

Ciao
Bruno




All times are GMT +1. The time now is 04:24 PM.

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