comparing array - finding how many kits can be made from existing inventory

rahulraji

New Member
Joined
Feb 10, 2016
Messages
5
Hi all,

I have inventory stock details with 11,000 part count and I am making vehicle from this inventory. Now for one vehicle I require 1300 to 1500 parts with varying quantity on each part. there will be multiple vehicle codes

I want to create a crisp VBA where it will show me
1) how many vehicles I can make considering current inventory stock.
2) how may vehicles I can make against the plan of each VC code and which parts are shortage and how much quantity for vehicle code.

I have done some work almost but these for and for each loops are increasing my processing time heavily cause I have around 11000 rows of inventory and 1300 to 1500 parts for each vehicle code.

Requesting your help guys
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Please provide example data to work with.
1686536991210.png



I have given sample data.. not able to upload the excel file.. component & its quantity from column J & K will change as Vehicle code gets change
 
Upvote 0
View attachment 93363


I have given sample data.. not able to upload the excel file.. component & its quantity from column J & K will change as Vehicle code gets change

Part number | Stock

Data is in In rows of 12000

And there is Vehicle code list and its part required list..

Part number | Required quantity


Now to plot how many vehicles i can make with current stock i am trying to loop vehicle code.. where vehicle required part list need to compare with stock file.

If any part is missing from part list or having zero value then i will just skip that vehicle code and move to next vehicle code.

If required part list of vehicle code is there then it should give a count of vehicle i can make considering current stock. Also the required quantity* vehicle can be made count should get minus from curre t stock so that current stock file can be updated for calculating next vehicle code count.

View attachment 93363


I have given sample data.. not able to upload the excel file.. component & its quantity from column J & K will change as Vehicle code gets change
 
Upvote 0

Forum statistics

Threads
1,215,086
Messages
6,123,031
Members
449,092
Latest member
ikke

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