#### Welcome to the Smartsheet Forum Archives

The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.

# Automating Parent Row based off RYG Children Rows

Options
edited 12/09/19

Hello!

I am looking for a formula that will show in the parent row an RYG color based on the children.

If there are any Red OR Yellow in the children rows, I want the parent row to show Yellow.

If there are only greens (no other color), I want the parent row to show Green.

How do I do the "or" statement? Thanks for any help!

Lindsey

Tags:

• ✭✭✭✭✭✭
Options

Lindsey,

here it is (modifying Craig's solution here):

=IF(OR(COUNTIF(CHILDREN(), "Red") > 0, COUNTIF(CHILDREN(), "Yellow") > 0), "Yellow", IF(COUNTIF(CHILDREN(), "Green") > 0, "Green", ""))

Atus

• Options

Hi Atus! Thank you so much! Once again, you are so helpful.

Is possible to add a third "OR" criteria (such as if yellow or red or blue in children, then turn parent row yellow). I would assume it is, but when I tried to add in that third criteria, it comes up as an error.

Thanks!

• ✭✭✭✭✭✭
Options

You're welcome. Happy to help.

Then it will look like this:

=IF(OR(COUNTIF(CHILDREN(), "Red") > 0, COUNTIF(CHILDREN(), "Yellow") > 0, COUNTIF(CHILDREN(), "Blue") > 0), "Yellow", IF(COUNTIF(CHILDREN(), "Green") > 0, "Green", ""))

• Options

Oh I see what I did. I did the same formula, but forgot to move the paranthesis. Thanks again for helping, Atus! Very much appreciated.

This discussion has been closed.