Create list of matches from two master lists

jobylewis

New Member
Joined
Apr 7, 2004
Messages
11
This is kind of hard to explain. Bear with me please.

I have a list of part numbers that we sell. I have imported a list of part numbers that people want to buy. I need to do the following:
1. Compare the two lists and find matches so we can sell these items
2. Sum the number of matches at the top of a third column
3. Create a resulting list of the part numbers under that sum total

The way I have done it was relatively simple. I think there has to be a way to get what I want that I just haven't found.

I have done #1 in column C =COUNTIF($A$1:$A$36019,B2)
And #2 is in column D =IF(C2>0,B2,"")

but what I now have is:
A2:A36018 is our part numbers
B2:BXXX is their part numbers (pulled from a database that changes daily)
C2:CXXX has 0s for non-matches and 1's for matches.
D2:DXXX has a list of part numbers that matched, but as you can imagine, they are maybe 5-10 cells out of 1000, so they're hard to find.

Ideally, I'd like to have A hidden, B hidden and just have one column that says the total number and the part numbers in a list. Any ideas?

Thanks in advance for any help!
 
The master list (part numbers we sell) is 36,000 part numbers. The list we are scrubbing (finding if we sell any of their requested part numbers) is usually between 10 and 250 part numbers.
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
jobylewis said:
The master list (part numbers we sell) is 36,000 part numbers. The list we are scrubbing (finding if we sell any of their requested part numbers) is usually between 10 and 250 part numbers.

Can we sort the latter in ascending order?
 
Upvote 0
Yes, they come sorted in most cases, but if not I can put that into the instructions for the End User. It's just an added step for the two somewhat computer novices that are going to be using this worksheet. Thanks a ton.
 
Upvote 0
jobylewis said:
Yes, they come sorted in most cases, but if not I can put that into the instructions for the End User. It's just an added step for the two somewhat computer novices that are going to be using this worksheet. Thanks a ton.

The speed trouble emanates from mainly too many formulas. Instead of comparing the longer list with the shorter one, I should have proposed the reverse process :roll: for this comparison fulfills exactly your purpose.
aaExtractCommonList jobylewis v2.xls
ABCD
1#OfCommonParts2
2InternPart#ExternPart#0CommonList
3X253X1521X152
4X152X170 X616
5X187X200  
6X616X281  
7X504X353  
8X142X424  
9X189X491  
10X407X568  
11X377X6162 
12X381X630  
13X528
14X619
15X657
Sheet1


Formulas...

C2:

=IF(ISNUMBER(MATCH(B3,A:A,0)),LOOKUP(9.99999999999999E+307,$C$2:C2)+1,"")

Note that the condition of IF is also reduced (for speed).

D1:

=LOOKUP(9.99999999999999E+307,C:C)

D3:

=IF(ROW()-ROW($D$3)+1<=$D$1,INDEX(B:B,MATCH(ROW()-ROW($D$3)+1,C:C,0)),"")

You might also want to sort the longer list (the list in column A) to speed up the process a bit.
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,789
Members
452,942
Latest member
VijayNewtoExcel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top