How To Reference Top Parent For Each Row
I'm trying to implement a formula that will reference the name of the rows Top/First Parent for each row. I have reviewed other threads on this and have not seen a definitive solution (or just one I could get to work). Ideally looking for something that could then be used as a column formula.
Our sheet is organized into 7 stages and ideally each row under each of these stages would reference the Top/First Parent task name independent of how many levels of hierarchy there are within the stage.
Screen shot of desired future state.
Any help is appreciated!
Best Answer
-
You would use something like this:
=IFERROR(INDEX(ANCESTORS([Task Name]@row), 1), [Task Name]@row)
Answers
-
You would use something like this:
=IFERROR(INDEX(ANCESTORS([Task Name]@row), 1), [Task Name]@row)
-
Yeah that worked great! Appreciate it!
-
Happy to help. 👍️
-
Thank you! This was a huge help.
-
Great solution if you need to reference to the parent only…. but I also need to reference to the grand parent and the great grand parent. In other words, I need a text in a cell that combines all the ancestors plus the row itself (with +).
How could I accomplish this?
Many thanks for any help.
Christoph
-
@Christoph Studinka You would use a JOIN function to join the ANCESTORS together.
-
Thanks Paul, interesting approach. I'll try (I'm curious).
I found a workaround in the mean time, works like a charm, but at the moment I am limited to 4 hierarchical levels… (working with IF/AND plus INDEX/Ancestors and 3 helper columns). Cheers, Christoph -
@Christoph Studinka It would be very similar to the INDEX function.
=JOIN(ANCESTORS([Column Name]@row), "+") + [Column Name]@row
-
Wow Paul, this is a very elegant solution! Saves hours of workaround work… Many thanks for this.
Christoph -
What if I would want a / between the ancestors:
Here: Three hierarchical levels to be joined together:
General / Functions / MarketingThanks again, Christoph
-
@Paul Newcome Thanks for explaining, I have been trying to figure out how to do that as well.
Isis Taylor
🎓️ Core App and Project Management Certified 🏅
🌟Peer Connect, Mobilizer, and Early Adopter Program
Business Analyst Senior
-
@Christoph Studinka You would change the "delimiter" portion of the JOIN function.
@Isis Taylor Glad this thread was able to help. 👍️
-
Many thanks, works well. The Smartsheet community is of invaluable help. I appreciate this enormously.
Christoph
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!