Seemingly simple formula will not work
I have a parent cell that should be looking at its children for a value, and if it finds that value in any of the children, it should display that value in itself, else nothing. This seems pretty straight forward, but it's not working. It is, instead, displaying the value regardless of what the children cells have as contents, including nothing at all. Or even if it has no children!
This is the formula:
=IF(COUNT(CHILDREN([Fail Column]@row)) = COUNTIF(CHILDREN(), "FAIL"), "FAIL", "")
And here's a slimmed-down version of the sheet:
https://app.smartsheet.com/b/publish?EQBCT=d1d1b1b95a774fd7aaed09494c6d1546
Help?
Thanks,
Suzanne
Answers
-
Hi Suzanne,
You were not using the Primary column which has the Parent/Child relationship, try this:
=IF(COUNT(CHILDREN([Test Category/Test Cases]@row)) = COUNTIF(CHILDREN(), "FAIL"), "FAIL", "")
The second reason why it didn't work was because there was no Children of Primary column, so it was counting Childrens as 0.
-
Hi Suzanne,
I changed the formula to the following.
=IF(COUNT(CHILDREN([Fail Column]@row)) > 0, "FAIL", "")
Would that work?
I hope that helps!
Have a fantastic week!
Best,
Andrée Starå
Workflow Consultant / CEO @ WORK BOLD
✅Did my post help answer your question or solve your problem? Please help the Community by marking it as the accepted answer/helpful. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
@Andrée Starå Well yes, that works just perfectly, and I understand it. I guess I was over-complicating things. The revelation that COUNT only counts non-empty cells is a big deal here.
Just to help me build my repertoire or formula rules and regs in my head, in the answer above from Jayesh, he calls out not using the "Primary column which has the Parent/Child relationship" is a problem...that is not actually accurate, is it? Even for that version of the formula (which does not work, btw)? Doesn't make sense to me that a column that has nothing to do with the subject matter at hand would need to be pulled into the equation.
Thanks in advance, and as usual,
Suzanne
-
Sorry! I missed this post.
No, the formula doesn't need to reference the primary column, only a column that has children rows.
Make sense?
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
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!