If(and(countif equation question
Attempting to make a status bubble roll up where the parent will turn green if there are any blank ("") cells except for when all child cells are blank. Below are some of my failed attempts:
IF(AND(COUNTIF(CHILDREN(), "") > 0, COUNTIF(CHILDREN(), "") <> COUNT(CHILDREN())), "Green")
results in blank cell only when all children are filled with a value that is not blank while being green if all children is blank
=IF(AND(COUNTIF(CHILDREN(), "") > 0, COUNTIF(CHILDREN(), "") <> 3), "Green")
I tried this to see what the equation is counting. It will be blank when all children are blank but also when all are filled.
Thanks
Comments
-
Hi Jeff,
COUNT(CHILDREN()) and COUNTIF(CHILDREN()) will only count child cells that have data in them.
You'll want to reference a parent cell that always has data in it (possibly the Primary column).
For example:
=IF(COUNTIF(CHILDREN(), "") = COUNT(CHILDREN([Project Name]1)), "Red", IF(COUNTIF(CHILDREN(),"") > 0, "Green")
The first part of this nested IF statement will turn the status Red if all children are blank, as long as there's data in all children for the other parent being referenced (in this example, row 1 of a column titled Parent Name). Otherwise, it will turn the status Green if there's one or more blank children.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!