# COUNT IF TWO CONDITIONS ARE MET

Hi!

I have this formula to identify if all my status are "Completo" then turn the cell "Completo", but if a children status is "Sin iniciar" then the status must stay "Sin terminar". But I want to include another status in my column "Condicionado", so I want that if all my status are "Completo" or "Conditionado" change the status to "Complete" too.

=IF(AND(COUNTIF(CHILDREN(); "Completo") > 0; COUNTIF(CHILDREN(); "Completo") = COUNT(CHILDREN())); "Completo"; "Sin terminar")

Thank you

• ✭✭✭✭✭✭

One more try:

=IF(COUNTIF(CHILDREN(); OR(@cell="Completo", @cell="Conditionado")) = COUNT(CHILDREN()); "Completo"; "Sin terminar")

Mark

I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

• ✭✭✭✭✭✭

If I understand correctly, this formula is working now for you but you want to add the additional condition to it? I wondered if the first IF is to determine if the row is a PARENT row? If yes then consider counting any child, not just if any of the children are complete.

I believe this is what you wanted?

=IF(COUNTIF(CHILDREN(); "Completo") > 0; IF(OR(COUNTIF(CHILDREN(); "Completo"; COUNTIF(CHILDREN(); "Conditionado"))) = COUNT(CHILDREN()); "Completo"; "Sin terminar"))

If the first IF was just to look for Parent rows then consider this formula instead

=IF(COUNT(CHILDREN()) > 0; IF(OR(COUNTIF(CHILDREN(); "Completo"; COUNTIF(CHILDREN(); "Conditionado"))) = COUNT(CHILDREN()); "Completo"; "Sin terminar"))

cheers,

• ✭✭✭✭✭✭

Try:

=IF(AND(COUNTIF(CHILDREN(); "Completo") > 0; COUNTIF(CHILDREN(); OR(@cell="Completo", @cell="Conditionado") = COUNT(CHILDREN())); "Completo"; "Sin terminar")

Work?

Mark

I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

• Hi!

Thank you @Mark Cronk and @KDM for your quick response!. However both suggestions drop me incorrect argument.

For example in that case ( the image I show below) the parent row is the one I want to change the status to Completo because all my children are "Completo" and one of them is "Condicionado". If one of my status is "Sin iniciar" the parent status must say "Sin terminar"

Hope with this example you can help me with the problem.

Thankyou!

• ✭✭✭✭✭✭