Compare two lists

G

Guest

I have two lists list1 and list2

List 1 List 2
a b
b d
c e
d
e

Is there a way I can get the items in List2 that already exist in List 1
(b,d,e). It looks simple for the lists above but when I have lists with 100
or so items, it is not so easy.

thinking about it, will a vlookup do the job?
 
T

T. Valko

One way:

Assuming your lists are in columns A and B. Enter this formula in column C
and copy down to the end of the list in column B:

=IF(ISNUMBER(MATCH(B2,A$2:A$6,0)),"x","")

X = exists in column A

Biff
 
G

Guest

Hi,

use a helper column in list 2 and enter this formula:
=VLOOKUP(list2!A1,list1!$A$1:$A$100,1,false)
copy drag down the formula to where ever you need

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top