Welcome to the Smartsheet Forum Archives
The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.
How to display the grandparent task name or value in a cell
Hello,
I would like to display the name or value in a cell, please. I could get the parent by:
IF(ISNUMBER([Stages Tasks]6), PARENT([Stages Tasks]6), "")
but I would like to get the Grandarent instead.
Thx for your help.
Comments
-
Hi Sweet,
You can use the ANCESTORS function with INDEX to grab the value in a grandparent cell in the same column as the child cell:
INDEX(ANCESTORS(<child_cell>), <parent_index>)
- e.g.; INDEX(ANCESTORS([Stages Tasks]6), 2)
- There's more info on the ancestors and index functions here: https://help.smartsheet.com/articles/775363-using-formulas
...and if you search those terms in Community you'll find several helpful posts showing examples of how to use these.
Matt
-
I'm struggling to get this formula to work. How do you identify the <parent index> in your description above? I simply want to pull in the text field from the highest level ancestor - in some cases this is the parent, sometimes it's the grandparent, sometimes it's the great-grandparent.
-
Hello,
You can use an index of 1 to identify the parent-most cell:
=INDEX(ANCESTORS(), 1)
If you're wanting to identify the grandparent of one cell from another, reference that adjacent child cell:
=INDEX(ANCESTORS(Stage6), 1)
More in these functions can be found in our help center:
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives