Pulling Parent/Ancestor info depending on row hierarchy
I'm trying to have a column (Dept Helper) auto fill based on one Ancestor cell in another column (Department). I have a helper column (APC) keeping track of the hierarchy already (Ancestor = 0-Anc, Parent=1-Par, Child=2-Chi). I only want the Dept Helper to fill-in rows that are not the header row (Ancestor).
Here is the formula I have now, I can't figure out why it shouldn't work.
=IF(APC@row = "1-Par", PARENT(Department@row), IF(APC@row = "2-Chi", ANCESTORS(Department@row)))
It works for Parents but not Children, which returns "INVALID COLUMN VALUE"
I've tried using OR and NOT, I'm not entirely sure I used them properly, but they haven't worked either.
Any help is appreciated.
Thanks
Best Answer
-
Try this:
=IF(APC@row <> "0-Anc", INDEX(ANCESTORS(Department@row), 1))
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Answers
-
Try this:
=IF(APC@row <> "0-Anc", INDEX(ANCESTORS(Department@row), 1))
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
Perfect, that did the trick. Thank you!
-
Happy to help. 👍️
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.9K Get Help
- 379 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 302 Events
- 33 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!