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")
Answers
-
Try something like this:
=IF(COUNT(DISTINCT(CHILDREN([Target Column]@row))) = 1, INDEX(CHILDREN([Target Column]@row), 1), "Different Values")
-
That's a verified Boom. Thank you Paul!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.1K Get Help
- 383 Global Discussions
- 212 Industry Talk
- 444 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 451 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 291 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!