# Parent Flagged if Children Flagged

edited 09/22/23

Hi all.

I have a task list that consist of multiple parent rows with Children

I have modifided so that if a task is delayed or dates are not added in the task will get a flag.

What i would like is to have if one or more of the Cildren Rows are Flagged the parent row will be flagged. but cant figure it out.

Ivé tried with =IF(SUM(CHILDREN())>=1; 1 ; 0)

If any of you could help me out

Tags:

• ✭✭✭✭✭

Hey Simon,

I worked up something similar for my own use. I think you could modify it to fit your needs. Have a peek:

=IF(COUNTIF(CHILDREN(), "Red") > 0, "Red", IF(COUNTIF(CHILDREN(), "Yellow") > 0, "Yellow", IF(COUNTIF(CHILDREN(), "Green") > 0, "Green", IF(COUNTIF(CHILDREN(), "Update") >= 1, "Update", IF(COUNTIF(CHILDREN(), "") >= 1, "Pending CO", IF(COUNTIF(CHILDREN(), "Gray") = COUNT(CHILDREN()), "Gray", "TBD"))))))

• Hi,

This one worked for me.

on the "Parent" row cells of the flag column i have placed this formula:

=IF(COUNTIF(CHILDREN(), =1) > 0, 1, 0)

• Hi, tested this and id worked perfect, Thank you!

• Ofir's formula worked perfectly!

Thanks!

-Chris

• Glad it worked and helped all of you!

• ✭✭✭✭

@Ofir Marco do you have a suggestion for this formula when when multiple children rows? If flag on any child rows, change parent to flag also. The =IF(COUNTIF(CHILDREN(), =1), 1, 0) works for any parent rows with 1 child row, but it produces #INVALID if multiple child rows with flags selected.

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!