How do you tell a cell what to do based on being a Parent or Children row?
I would like to use one formula in the entire column instead of having to copy and paste based on being a child or parent row. My child formula looks for word vacant in the name column and if so subtracts the total of 4 other cells from 0. If the word is not found the cell remains blank.
=IF(CONTAINS("vacant", Name@row), 0 - SUM([Career FTE - Active]@row:[Per Diem FTE - LOA]@row, ""))
The parent formula is just adding the children: =SUM(CHILDREN())
How do I put these together so that if it's a parent row it sums the children but if not it does the calculation? I'm confused on where to add the additional IF and CHILDREN in the formula. Any assistance is greatly appreciated!
Best Answer
-
You would use an IF statement like so:
=IF(COUNT(CHILDREN(Name@row)) > 0, parent_formula, child_formula)
Answers
-
You would use an IF statement like so:
=IF(COUNT(CHILDREN(Name@row)) > 0, parent_formula, child_formula)
-
Thank you Paul! This worked perfectly and I never would have figured out the right order for this. Happy Friday!
-
Happy to help. 👍️
Help Article Resources
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
Check out the Formula Handbook template!