Return a Parent Value if All Children Values are the Same
I am trying to have a parent cell in one column return the value of the children cell in another column if all of those children have the same value. I thought I could have the cell check the first child and then see if all the rest matched. If they did, that means they are all the same, and the formula would return that first child cell value. If not it would return "Different Values". It is not working though. It always returns "Different values." Any ideas on where I've gone wrong? Much Thanks!
=IF(COUNTIF(CHILDREN(Target Column@row), CHILDREN(Target Column@row)) = COUNT(CHILDREN(Target Column@row)), CHILDREN(Target Column@row), "Different values")
Best Answer
-
Try something like this:
=IF(COUNT(DISTINCT(CHILDREN([Target Column]@row))) = 1, INDEX(CHILDREN([Target Column]@row), 1), "Different Values")
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Answers
-
Try something like this:
=IF(COUNT(DISTINCT(CHILDREN([Target Column]@row))) = 1, INDEX(CHILDREN([Target Column]@row), 1), "Different Values")
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
That's a verified Boom. Thank you Paul!
-
Happy to help. 👍️
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 380 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 305 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!