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.4K Get Help
- 424 Global Discussions
- 221 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 144 Just for fun
- 61 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!