Compare 2 files and find common numbers and then calculate simple formula

Chris Scott

New member
Joined
Feb 5, 2013
Messages
1
Reaction score
0
Points
0
Location
A, A
I have 2 files I need to compare.... a buyer file and a seller file.

BUYERABCD
1PRODUCT NUMBERDESCQTY12MOS
2123NUT2575
3456BOLT50100
4789SCREW1080


SELLERAB
1PRODUCT NUMBERQTY
246567
3789125
445765


Step 1: Compare Product Numbers and look for common products on both files
Step 2: Calculate how many items I should recommend the Buyer to buy. For Example: Product 789 is on both files. The buyer has 10 in stock and sells 80 in a year. So to bring him up to a years worth of inventory, I would recommend he buy 70 from the Seller.

The gotcha is that the Buyer file could have anywhere from 20k - 30k lines of different products. The seller may only have 50-100 different lines. Also.. there could be multiple common part numbers in which case we would want to suggest buys for all the part numbers that match.

Anyone know the easiest way to do this?
 
Top