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
- Customer Resources
- 64.5K Get Help
- 424 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 146 Just for fun
- 63 Community Job Board
- 465 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!