Replacing a single row in a table with multiple related values

danbtaylor

New Member
Joined
Oct 1, 2013
Messages
1
I am trying to break down the following 2-column table to include only each 'FinishedGood' and all its 'Inventory Parts' broken down to the 'Component' level. I want to replace each 'SubAssembly' Inventory Part with its corresponding 'Components':

Source Format:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Assembly Item[/TD]
[TD]Inventory Part[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component1[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]SubAssembly1[/TD]
[/TR]
[TR]
[TD]SubAssembly1[/TD]
[TD]Component2[/TD]
[/TR]
[TR]
[TD]SubAssembly1[/TD]
[TD]Component3[/TD]
[/TR]
[TR]
[TD]SubAssembly1[/TD]
[TD]Component4[/TD]
[/TR]
[TR]
[TD]SubAssembly1[/TD]
[TD]SubSubAssembly1[/TD]
[/TR]
[TR]
[TD]SubSubAssembly1[/TD]
[TD]Component5[/TD]
[/TR]
[TR]
[TD]SubSubAssembly1[/TD]
[TD]Component6[/TD]
[/TR]
</tbody>[/TABLE]


Desired Format:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Assembly Item[/TD]
[TD]Inventory Part[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component1[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component2[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component3[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component4[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component5[/TD]
[/TR]
[TR]
[TD]FinishedGood1[/TD]
[TD]Component6[/TD]
[/TR]
</tbody>[/TABLE]

A FinishedGood may be comprised of a SubAssembly, a Component, another FinishedGood, or any combination of such. A SubAssembly may be part of multiple distinct FinishedGoods, and a component may be part of multiple distinct SubAssemblies

This information changes daily, and is updated through an ODBC data source, so automating the process is crucial.

I've tried creating separate tables for each stage, i.e., FinishedGoods, SubAssembly, etc., and relating them, however I've had no luck. I've also tried SQL queries to no avail.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,223,237
Messages
6,170,924
Members
452,366
Latest member
TePunaBloke

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