How can I create a BOM chart using VBA?

Dava Masco

New Member
Joined
Mar 13, 2025
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hi expert, I have a data table with 3 columns. Column 1: Type of product(Part or Unit). Column 2: Location . Column 3: Block. as image below:
1741849709899.png

Column 1: Defind name: Part /Unit
Column 2: Location to located part/unit in sheets
Column 3: The block column will show which items are assembled together, for example, 1.1, 1.2, and 1.3 will be assembled together into block 1. And 1.1 and 1.2 are parts, while 1.3 is a unit.
To easier imagine I will attach my expectation.

1741850143286.png

Can someone help me with this? I would greatly appreciate your assistance.
 
Hello,
I would recommend taking a look at SmartArt objects > hierarchy/process kinds. Those objects allow for easy "node insertion" during tree construction. However, this will require strong bases in VBA and good understanding of tree data structure. It's really not an "easy task".
Especially since you will need to "create the tree" as it appears you do not have a hierarchy structure yet, besides the "rows order". I would have used block numbers like so to make the task easier:

Product

Block

QC1

1.1

QC2

1.2

Unit1

1
 
Upvote 0
Hello,
I would recommend taking a look at SmartArt objects > hierarchy/process kinds. Those objects allow for easy "node insertion" during tree construction. However, this will require strong bases in VBA and good understanding of tree data structure. It's really not an "easy task".
Especially since you will need to "create the tree" as it appears you do not have a hierarchy structure yet, besides the "rows order". I would have used block numbers like so to make the task easier:

Product

Block

QC1

1.1

QC2

1.2

Unit1

1
Thanks you for your respond! First I also use SmartArt object but it's not reach my expectation. You can see image above. Can you give me or recommend for me SmartArt similar with my expectation?
 
Upvote 0
I would go for the ones in Hierarchy. Maybe have a look a the Office.com ones too.
1742202344286.png
 
Upvote 0

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