Equation to sum children, if no children then return value from a different column
Hi - I"m looking for an equation in column A to sum the value of column B for any children rows. However, if there are no children, then I would like the equation to return the value in column B. I have a helper column set up so that parent/child can be distinguished with 0, 1 or 2 value based on hierarchy.
Any guidance much appreciated. Thanks,
Answers
-
Hi @Karenmst!
I would make another helper column for children due to a piece of criteria being if the row has no children. You can do this by using =COUNT(CHILDREN()).
Assuming that new helper column is named "Helper - Children", you can use the following equation for your problem:
=IF([Helper - Children]@row > 0, SUM(CHILDREN([column B]@row)), [column B]@row)
I might've misunderstood your question so let me know if that doesn't work!
-
That did the trick!! Thank you so much!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!