How do I add criteria to formula?
The smartsheet template I'm utilizing has a built-in formula for the status that is based off of the children...
=IF(COUNTIF(CHILDREN(), "Completed") = COUNT(CHILDREN()), "Completed", IF(COUNTIF(CHILDREN(), "Not Started") = COUNT(CHILDREN()), "Not Started", IF(COUNTIF(CHILDREN(), "In Progress") > 0, "In Progress", IF(COUNTIF(CHILDREN(), "Not Started") > 0, "In Progress", IF(COUNTIF(CHILDREN(), "Blocked") > 0, "In Progress")))))
For this particular project I have added the value "Nothing to Submit" to the Status dropdown list. How do I modify the existing formula to reference the parent as "Completed" even when the children's value is "Nothing to Submit"?
Any assistance is greatly appreciated!
Answers
-
This should do the trick, add in another COUNTIF:
=IF(COUNTIF(CHILDREN(), "Completed") + COUNTIF(CHILDREN(), "Nothing to Submit") = COUNT(CHILDREN()), "Completed", IF(COUNTIF(CHILDREN(), "Not Started") = COUNT(CHILDREN()), "Not Started", IF(COUNTIF(CHILDREN(), "In Progress") > 0, "In Progress", IF(COUNTIF(CHILDREN(), "Not Started") > 0, "In Progress", IF(COUNTIF(CHILDREN(), "Blocked") > 0, "In Progress")))))
Here is a link to a demonstration sheet:
-
Thank you, Lee. The formula does indeed work, but is there a way to modify it so the parent specifies "Completed" when the children are either "Completed" or "Nothing to Submit"? Sorry I didn't include that criteria in my initial question.
Thanks!
-
Above is the result using the initial formula.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 472 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!