Creating an "Ultimate Parent" Column for a Parent-Child Relationship

dcu5001

New Member
Joined
Mar 3, 2014
Messages
6
Hi everyone. I've found threads that cover similar questions to the one I have, but none which touch upon exactly what I'm looking for. This is also the first time I've posted in here, so I apologize if I do anything incorrectly.

What I'm trying to do is create an additional column within Excel that shows the "Ultimate Parent" for each value in my data. Let's say I have a table that looks like this:

fdX8U1C.png


I want to create a new trigger column which shows the ID of each entity's "Ultimate Parent" (with Bank Headquarters 1, 2, and 3 being the "Ultimate Parents" in this example):

STtiOSc.png


From what I've gathered looking around for any sort of help to this problem, the way this issue is resolved is through VBA since Excel doesn't have any sort of tree functionality. I am just okay when it comes to Excel, and have very little experience with VBA (even though I do have a coding background with SQL). I was wondering if someone could point me in the right direction to what needs to be done in order to get this new "Ultimate Parent" column...I've searched around a bunch of different sites and forums and haven't been able to find anything that works. Thanks in advance, and if there's anything I can clear up about my example please let me know.
 
This is exactly what I was looking for, thanks Jerry. I'm located in NYC, but if I ever make it out to San Diego I owe you a beer.

Cheers!
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,215,161
Messages
6,123,375
Members
449,098
Latest member
Jabe

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