Nested IF with Children

Greetings,

I'm attempting to configure an Epic (parent) field to automatically change based on the statuses of the child fields. For example, the criteria I'm attempting to meet is:

  1. If all child status fields are in "To Do" then parent field status is "To Do" else "In Progress"
  2. If all child status fields are in "Done" Then parent field status is "Done" else "In Progress"

I've written two separate formulas that work, but I have so far failed to combine them. So far what I have for item number 1 is:

=IF(AND(COUNTIF(CHILDREN(), "To Do") > 0, COUNTIF(CHILDREN(), "To Do") = COUNT(CHILDREN())), "To Do", "In Progress")

And for item number 2 I have:

=IF(AND(COUNTIF(CHILDREN(), "Done") > 0, COUNTIF(CHILDREN(), "Done") = COUNT(CHILDREN())), "Done", "In Progress")

I've attempted to combine them into the following with no success:

=IF(AND(COUNTIF(CHILDREN(), "To Do") > 0, COUNTIF(CHILDREN(), "To Do") = COUNT(CHILDREN())), "To Do", "In Progress", IF(AND(COUNTIF(CHILDREN(), "Done") > 0, COUNTIF(CHILDREN(), "Done") = COUNT(CHILDREN())), "Done", "In Progress")

Any help is appreciated, thanks!

Best Answer

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!