Drawing Organisation Chart based on the shareholding percentage and calculating accumulation and dominating members

Deepika23

New Member
Joined
May 1, 2018
Messages
2
I have to automate the drawing of the organizational chart by the way of VBA and complete some calculation. For Example:

On Sheet1, I have allowed the user to input the organizational details which can dynamic as below:
[TABLE="width: 200"]
<tbody>[TR]
[TD]Level[/TD]
[TD]Name[/TD]
[TD]Percentage value[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Alphabet[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]1.1[/TD]
[TD]Google[/TD]
[TD]40[/TD]
[/TR]
[TR]
[TD]1.2[/TD]
[TD]Calico[/TD]
[TD]60[/TD]
[/TR]
</tbody>[/TABLE]
On Sheet2, with the help of the vba code I am pasting the above values and completing the accumulation and domination calculation:
Accumulation logic : the total shares accumulated by the child at each level in its parents level i.e., 1.1 accumulation in 1
Domination logic : if the percentage value is more 50 then the child owns the total share of the parent i.e., 1.2 owns 100% of 1

[TABLE="width: 200"]
<tbody>[TR]
[TD]Level[/TD]
[TD]Name[/TD]
[TD]Percentage value[/TD]
[TD]Accumulation[/TD]
[TD]Domination[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Alphabet[/TD]
[TD]100[/TD]
[TD]100
[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]1.1[/TD]
[TD]Google[/TD]
[TD]40[/TD]
[TD]40[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]1.2[/TD]
[TD]Calico[/TD]
[TD]60[/TD]
[TD]60[/TD]
[TD]100[/TD]
[/TR]
</tbody>[/TABLE]

Along with the above calculation the vba needs to generate the two org charts. I have the code but it is buggy and heavy. Can somebody help me in writing the simple code.?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,223,903
Messages
6,175,287
Members
452,631
Latest member
a_potato

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