How do I create a multi-level bill of materials from a single level BOM table?

EinarG

New Member
Joined
Jul 3, 2014
Messages
8
Starting with this Single Level BOM table (Windows 7 Pro, Excel 2013). "Qty Per" refers to the quantity of the child needed in the Parent:

ParentChildQty Per
PART-APART-A11
PART-APART-A11215
PART-APART-A22
PART-APART-A2224
PART-A1PART-A112
PART-A11PART-A1111
PART-A11PART-A1122
PART-A112PART-A11211
PART-A112PART-A11222
PART-A2PART-A211
PART-A2PART-A222
PART-A2PART-A2213
PART-A22PART-A1124
PART-A22PART-A2211
PART-A22PART-A2223
PART-BPART-A12
PART-BPART-A213

<tbody>
</tbody>

I need (a Macro) to generate the exploded (or stacked) table below. As an example doing this manually for the Grand Child, the process went like this:

1. For each single level BOM Parent/Child row (R), find # grand children rows (N)
2. Copy entire row (R) and insert N-1 copies below row R (Note: if N=1, no copy/insert is required)
3. Find grand child(ren) for each child and corresponding Qty Per in the single level BOM Table and copy/paste into Grand Child / Grand Child Qty per columns
4. Repeat steps 1-3 for Great Grand Children and Great Great Grand Children


Parent
Child
Child Qty Per
Grand Child
Grand Child Qty per
Great Grand Child
Great Grand Child Qty Per
Great Great Grand Child
Great Great Grand Child Qty Per
PART-A
PART-A1
1
PART-A11
2
PART-A111
1


PART-A
PART-A1
1
PART-A11
2
PART-A112
2
PART-A1121
1
PART-A
PART-A1
1
PART-A11
2
PART-A112
2
PART-A1122
2
PART-A
PART-A1121
5






PART-A
PART-A2
2
PART-A21
1




PART-A
PART-A2
2
PART-A22
2




PART-A
PART-A2
2
PART-A22
2
PART-A112
4
PART-A1121
1
PART-A
PART-A2
2
PART-A22
2
PART-A112
4
PART-A1122
2
PART-A
PART-A2
2
PART-A22
2
PART-A221
1


PART-A
PART-A2
2
PART-A22
2
PART-A222
3


PART-A
PART-A2
2
PART-A221
3




PART-A
PART-A222
4






PART-A1
PART-A11
2
PART-A111
1




PART-A1
PART-A11
2
PART-A112
2
PART-A1121
1


PART-A1
PART-A11
2
PART-A112
2
PART-A1122
2


PART-A11
PART-A111
1






PART-A11
PART-A112
2
PART-A1121
1




PART-A11
PART-A112
2
PART-A1122
2




PART-A112
PART-A1121
1






PART-A112
PART-A1122
2






PART-A2
PART-A21
1






PART-A2
PART-A22
2
PART-A112
4
PART-A1121
1


PART-A2
PART-A22
2
PART-A112
4
PART-A1122
2


PART-A2
PART-A22
2
PART-A221
1




PART-A2
PART-A22
2
PART-A222
3




PART-A2
PART-A221
3






PART-A22
PART-A112
4
PART-A1121
1




PART-A22
PART-A112
4
PART-A1122
2




PART-A22
PART-A221
1






PART-A22
PART-A222
3






PART-B
PART-A1
2
PART-A11
2
PART-A111
1


PART-B
PART-A1
2
PART-A11
2
PART-A112
2
PART-A1121
1
PART-B
PART-A1
2
PART-A11
2
PART-A112
2
PART-A1122
2
PART-B
PART-A21
3







<tbody>
</tbody>
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,214,979
Messages
6,122,557
Members
449,088
Latest member
davidcom

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