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.?
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.?