Morning All,
Currently am working on an excel sheet that has our product inventory in it. Many of the parts we put together are kitted, i.e they require several other items to make them. I have an excel sheet that lists the part #'s and the qty's required to make them, and I have a Vlookup that tells me the qty of each that I have in stock. What I want to do is have it tell me how many complete kits I could build given the stock that I have on hand. Any ideas on the best way to do this?

Column A Column B Column C Column D
Main Part Qty Required to build Main part Qty on Hand Desired result total qty of main part that can be built,
Component A 1 10 in this example the answer should be 7 as component B wouldn't
Component B 2 15 have enough stock to produce more.
Component C 1 25


Any suggestions would be greatly appreciated, thanks