Helper Column Parents and Tasks with 0 Children
I am using this formula in a helper column to identify which of my rows are "parents" however I would also like to Identify Rows that are Projects or also "Parents", but have 0 children " so that I can tag in conditional formatting along with my Parent Rows that have children. Can you help me create a formula that can do this?
=IF(COUNT(CHILDREN([Project Name]@row)) > 0, "Parent", "")
Comments
-
We use a similar helper column for conditional formatting with this formula below to show what level it is in the project. Then we use conditional formatting off the level to color code rows. It will display level numbers (1, 2, 3, etc) depending on how many levels you drill down to.
=IF(COUNT(CHILDREN([Task Name]@row)) > 0, COUNT(ANCESTORS()) + 1)
-
Try using a COUNTIFS and a PARENT functions together. If the resulting number is equal to the MAX, then it is the lowest level of hierarchy. If it is less than the MAX then it is not the lowest level which in turn means that it is a "parent row without a child" so to speak.
-
Thank you, this one is still only returning a number for a Parent Row with Children, and not showing anything on the Tasks with 0 children...
In this example I placed a check mark next to all of the other rows I want to Return a result for in the Parent column. Not sure if this helps clarify what I need or not. I'm also new to smartsheet. I'm not sure how to share my actual sheet.
any help is appreciated.
https://app.smartsheet.com/sheets/JcfPrP7xWv7qCW38VWjVvjgJQhQv7P4wWH7cr2V1
-
It should work if you count for Ancestors instead of Children.
=IF(COUNT(ANCESTORS()) > 0, "", "Parent")
-
=IF(COUNT(PARENT()) < MAX([Parent Count Column Name]:[Parent Count Column Name], "Parent")
Try something like this. Work backwards. Instead of counting the children rows, count the parent rows. If it is equal to the highest number, then it is the lowest level of hierarchy.
-
Thanks Brian. I meant ANCESTORS to count how many parents the row has... Ugh. It's Friday...
-
Hi,
You can use the below formula with conditional formatting if you choose to not include any levels.
=IF(COUNT(CHILDREN([Task Name]@row)) > 0, COUNT(ANCESTORS()) + 1)
Hope that helps!
Have a fantastic weekend!
Best,
Andrée Starå
Workflow Consultant @ Get Done Consulting
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
This one worked! Thank you Thank you!
-
Excellent! Happy to help.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.9K Get Help
- 410 Global Discussions
- 219 Industry Talk
- 457 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!