Suggested formula not working
I found out you can't return a column name in a formula, so I added them into the first row. I am trying to find the name of the fruit associated with the highest value, 2nd highest value, etc.
Smartsheets suggests: =INDEX([Apple]1:[Clementine]1, MATCH(MAX([Apple]2:[Clementine]2), [Apple]2:[Clementine]2, 0)) but I get an error every time. Anyone see something I'm missing?
Best Answer
-
=INDEX([Apple]1:[Clementine]1, 1, MATCH(MAX([Apple]2:[Clementine]2), [Apple]2:[Clementine]2, 0))
Add 1 before your
MATCH
function since you will be looking at a single row. YourMATCH
function will provide the column arguement of theINDEX
function....
Answers
-
=INDEX([Apple]1:[Clementine]1, 1, MATCH(MAX([Apple]2:[Clementine]2), [Apple]2:[Clementine]2, 0))
Add 1 before your
MATCH
function since you will be looking at a single row. YourMATCH
function will provide the column arguement of theINDEX
function....
-
thank you @heyjay! That worked! Suggestions for if I wanted to find the 2nd, 3rd 4th largest and so on?
-
I would suggest getting rid of the MAX function and using a LARGE function. That way you can use cell references for 1st, 2nd, 3rd, etc. to make drag-filling the formula easier and it is the same formula for each number (you would have to use the LARGE for 2nd+ anyway).
=INDEX($[Apple]$1:$[Clementine]$1, 1, MATCH(LARGE($[Apple]2:$[Clementine]2, VALUE(LEFT(Apple$14))), $[Apple]2:$[Clementine]2, 0))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 423 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 143 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!