Retrieve data from table.

Michnia25

New Member
Joined
May 31, 2015
Messages
38
Hi,

I have a problem with a multilevel parent-child relationship in my table. The table contains two columns: "parent" and "child." The "parent" column has hundreds of different codes, and each code has several child codes contained within it.

For some items, the child codes become parents as they also include other child codes, and so on.

I've been trying to find a way to achieve the following outcome, but after two days of trying, I gave up. Can someone please help me with this?

1695653970508.png
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi,

I have a problem with a multilevel parent-child relationship in my table. The table contains two columns: "parent" and "child." The "parent" column has hundreds of different codes, and each code has several child codes contained within it.

For some items, the child codes become parents as they also include other child codes, and so on.

I've been trying to find a way to achieve the following outcome, but after two days of trying, I gave up. Can someone please help me with this?

View attachment 99248
I can deduce from your Data table what the relationships are but what do you want to do with this data?

Can you please update your profile to indicate what version of Excel you are using?

I assume that these are not the actual codes that you will be using but just used here to demonstrate the idea to us.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

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