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!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.1K Get Help
- 450 Global Discussions
- 155 Industry Talk
- 505 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 80 Community Job Board
- 514 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!