Dynamically fill a cell with text
I have included a picture to help tell the scenario, but I'm trying to dynamically populate a cell with the question's name with the highest result. The actual form I'm using has over 160 columns, so I'm trying to find a way to automate the top result(s) with the question's name. The expectation is to eventually scale this to list the top 5 to 10 questions.
Thanks for any help you all can provide!
Best Answers
-
The basic idea would be:
=INDEX(COLLECT([Column2]1:[Column5]1, [Column2]@row:[Column5]@row, @cell = MAX([Column2]@row:[Column5]@row)), 1, 1)
what do you want to do when there is 2 equal ones?
You could join them:
=JOIN(COLLECT([Column2]1:[Column5]1, [Column2]@row:[Column5]@row, @cell = MAX([Column2]@row:[Column5]@row)), ", ")
If you want this to be a column formula you would do as below:
=JOIN(COLLECT(INDEX([Column2]:[Column5], 1), [Column2]@row:[Column5]@row, @cell = MAX([Column2]@row:[Column5]@row)), ", ")
-
Thanks, @Leibel Shuchat! These formulas gave me the results I needed. I appreciate it very much!
Answers
-
The basic idea would be:
=INDEX(COLLECT([Column2]1:[Column5]1, [Column2]@row:[Column5]@row, @cell = MAX([Column2]@row:[Column5]@row)), 1, 1)
what do you want to do when there is 2 equal ones?
You could join them:
=JOIN(COLLECT([Column2]1:[Column5]1, [Column2]@row:[Column5]@row, @cell = MAX([Column2]@row:[Column5]@row)), ", ")
If you want this to be a column formula you would do as below:
=JOIN(COLLECT(INDEX([Column2]:[Column5], 1), [Column2]@row:[Column5]@row, @cell = MAX([Column2]@row:[Column5]@row)), ", ")
-
Thanks, @Leibel Shuchat! These formulas gave me the results I needed. I appreciate it very much!
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!