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

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,223,716
Messages
6,174,069
Members
452,542
Latest member
Bricklin

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