Issue with Health Symbols

Assume a single parent cell with two children. Here is the formula I am using:

IF(CONTAINS("Red", CHILDREN()), "Red", IF(CONTAINS("Yellow", CHILDREN()), "Yellow", IF(COUNTIFS(CHILDREN(), "Green") = COUNT(CHILDREN()), "Green", IF(COUNTIFS(CHILDREN(), "Blue") = COUNT(CHILDREN()), "Blue")))

The issue is the Green and Blue. If any of two children are blank and I have a single Green (or Blue), the parent cell is Green (or Blue), when in fact what I need is for both children to be Green (or Blue) before the parent becomes Green (or Blue).

I would also like to add that if one is Green and one is Blue then the status should be Green.

Can anyone help?

Answers