Sum of Parent and Child but also provide the Parent data when no Child present
I would like to calculate the Sum of the Parent and the Child data under Number of Compounds Tested, however I do not always have a child and only a Parent at times. I did create a Helper Cell Hierarchy but cant seem to find the correct formula. When there is a child, I do not want any sum calculated in that row as for this given project the information would be only featured on the row of the Parent.
What would be the best formula?
Answers
-
Are you able to provide some screenshots for more context? sample data is fine to show the structure and expected operation.
-
Here
-
Create a column labeled P. Column Formula =ANCESTORS([Vendor Study ID]@row). Create a second column labeled C. Column Formula =CHILDREN([Vendor Study ID]@row).
IF(P@row >0, "", IF(P@row = 0, SUM(CHILDREN([Number of Compounds to be Tested]@row + [Number of Compounds to be Tested]@row )
I use P & C on ALL of my sheets as helpers.
Michelle Choate
michelle.choate@outlook.com
Always happy to walk through any project you need help with! Book time with me here: https://calendly.com/michelle-choate
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!