Multiple child Parent relation hierarchy.

gshalini

New Member
Joined
Jan 21, 2018
Messages
3
Hi, I wanted to create a Hierarchy, which can contain multiple parent and child.

Input Data :-[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Role[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]6[/TD]
[TD]7[/TD]
[TD]8[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]R[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD][/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD][/TD]
[TD]R[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD][/TD]
[TD][/TD]
[TD]R[/TD]
[/TR]
[TR]
[TD]F[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD]R[/TD]
[TD][/TD]
[TD]R[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Role A - 1,2,3,4
So each Role is formed with the data's in 1, 2, 3...

Wanted to create a Hierarchy of Parent child relation.

Output expected :-

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Parent[/TD]
[TD]A[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]Child[/TD]
[TD]B F[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]Granchild[/TD]
[TD]E[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Kindly help me to create Output table for a large data.

[TABLE="width: 759"]
<colgroup><col span="7"><col><col span="2"></colgroup><tbody>[TR]
[TD][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Welcome to the Board!

I'm confused. How do you know that B and F are children of A?
 
Upvote 0
Hi Eric,

B and F inherits 1,2,3 and 4 from A. B having an additional of 5 and F with an additional access of 6.
 
Upvote 0
OK, consider this sheet:

ABCDEFGHIJ
Role
ARR
BRRRR
C
D
ERRRRR
FRRRR

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]9[/TD]

[TD="align: center"]2[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]3[/TD]

[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]4[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]5[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]

[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]7[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet5



B and F are both children of A, since A has 1/2, and B and F both have 1/2. E is a child of B, but not F. D is a child of F, but not B. How do you want this displayed?

ABC
ParentAA
ChildBF
GrandchildED

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]11[/TD]

[TD="align: center"]12[/TD]

[TD="align: center"]13[/TD]

</tbody>
Sheet5



How deep do you want it? Grandchild, greatgrandchild, great-great-, etc.? How big is your actual table?

And you can also consider E and D to be children of A by your logic. This can get complicated very fast.
 
Upvote 0
Hi Eric,

Apologies for late reply.

Yep the hierarchy which I'm look for will be Grandchild, greatgrandchild, great-great... etc. It may got till 6 levels of relationships.

Basic parent with 1 child will be easy, however requirement is that 1 child may have multiple parent :(

Regards,
Shalini
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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