Need help in gathering data of all the children entities rolling upto a parent in Excel through VBA

Pnka123

New Member
Joined
Apr 18, 2016
Messages
1
Hi All,
I am working on a tool which involves parent-child data.

Considering the two cases below, I need to consolidate data which is rolling up-to my client ultimately in a different sheet through a VBA code. In example 1 below my client is A whose parent is B and B’s parent is C. A has 4 children and similarly E has three children and so on. I need a code through which I can consolidate data of all children ultimately rolling up-to my client. There can be multiple levels of hierarchy involved. Hope I was able to explain myself well.

Scenario 1
Parent Child

C B
B A Client
A E
A F
A G
A H
E I
E J
E K
F L
I M
I N
M O
M P
M Q

Scenario 2
Parent Child

C B
B A Client
A E
A F
A G
A H
E I
E J
E K
E L
E M
E N
F O
F P
F Q

Kindly help to make a dynamic vba code for this one.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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