Discussion Locked

Comparing 2 lists in excel 2000

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I hava a list of product codes (~15000 entries). I also have a list of files (~50000), one for each product plus some for other products. The name of each file begins with the product code.
Some of the files are missing, and obviously going through to track them down by hand is not possible. What I am trying to do is compare the list to find which products do not feature in the file list:
I need to split the list of product codes in to 2, 1 for codes that _do_ feature in the file list, and1 for codes that _don't_ feature in the file list.
I have tried writing a macro to perform this, but my efforts have so far not produced what I need. I remember reading a possible solution to this a while ago and thought 'that could be useful' butobviously now I can't find it again :)
Cheers,
Jamie

5 replies

by larry h.

You can use an array formula to do this. Put the two lists side-by-side in columns A and B. The main list in column A has 100 members. In cell C1 type a formula like the following:

=SUM(IF($A$1:$A$100=B1,1,0))
[Be sure to finish this off by pressing CTRL+SHIFT+ENTER so that it is saved as an array formula. You'll see {curley braces} around the formula confirming this.]

This formula will compare the value in cell B1 to all members in the list in column A. For each instance of an exact match it will add 1. Any result greater than 0 means that there's a match. Greater than 1 means that you have duplicates. A result of 0 means that item has no match. Then simply copy the formula down column C.

You may need to use the LEFT() function on one of the columns if its values have extra text on the end of the items.

by k42179

The question is vauge. What I would do is to freeze panes so you get both list on one page to the collum you want. The formular youshould have.

This discussion is closed to new replies.