We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!Submit Feedback
Last week's solution can be found here!
This week's challenge was brought to you by no other than the distinguished @Joe_Mako!
A bill of materials or product structure (sometimes bill of material, BOM or associated list) is a list of the raw materials, sub-assemblies, intermediate assemblies, subcomponents, parts and the subcomponents each needed to manufacture an end product.
In the bill of materials, each record is a line item with a Line ID, Level, Part Number, Description, Unit, Quantity, and Parent ID. Your challenge is to calculate the 'Full Quantity' and 'Parent Quantity' of each line item. For example, 1 car has 4 wheels, each wheel has 5 bolt assemblies, and each bolt assembly has 2 washers. For the washer line item, the Full Quantity is 40, and the Parent Quantity is 20.
The ideal solution would work for any number of levels.
Charlie Chaplin on the Assembly Line
Really fun challenge, @Joe_Mako!!
Started to create an Iterative macro, but then remembered techniques from past challenges and decided to do it macro-less. Took a slightly different angle than @patrick_digan
My solution! Took the Iterative macro approach, and while it technically worked, I couldn't figure out how to get the iterative results to automatically sort into Line ID order before output... but I was happy enough to get the iterative part working, so it'll do 🙂
thanks for the challenge @Joe_Mako!