Tom’s Tutorials For Excel: LOOKUP By MIN or MAX
You can do a lookup based on other worksheet functions such as MIN and MAX.
In Picture #1, the formula
=INDEX(A2:A11,MATCH(MIN(B2:B11),B2:B11,0)) returns Isabella because her Sales Dollars number of $5,012 is the lowest (minimum) number in column B.
In Picture #2, the formula
=INDEX(A2:A11,MATCH(MAX(B2:B11),B2:B11,0)) returns Francesca because her Sales Dollars number of $8,289 is the highest (maximum) number in column B.
I have been searching for this for the past TWO days and no one in my class could figure this out! When I input this formula and it gave me the correct answer, I seriously wanted to do the happy dance! Thank you so much for this!
THANK YOU so much! Is there a way to do this with vlookup? I tried http://www.atlaspm.com/toms-tutorials-for-excel/toms-tutorials-for-excel-using-vlookup-with-min-max-and-average/ but it doesn’t work.
There is a way but the formula would be heavier than this, and be less efficient.
I want to do this one step further. What would we do if the name Isabella comes twice in the list? I am thinking something like looking up dates of batches of production of a material and pulling out the oldest material.
Thank You!!! I have been struggling to find a formula for weeks now for my problem, and here it is!
Hi Tom ,
Would you be able to advise how to work the below :
I want to lookup the minimum value from column G where column A is duplicated and G has various values .
Thanks for taking the time on this.
_ ColA BCDEF ColG HI ColJ ColK
1 Bill _____ 2679 __ Lisa 2814
2 Lisa _____ 6233
3 Jane _____ 1234
4 Lisa _____ 2814
5 Bill _____ 3118
6 Bill _____ 1997
7 Lisa _____ 8647
8 Jane _____ 1526
9 Lisa _____ 5304
Formula in cell K1 is
THIS IS AN ARRAY FORMULA.
You apply it to a cell by pressing CTRL+SHIFT+ENTER, ***not just with ENTER***.
not working, returns 0 as an answer
I just re-created this example on 2016 and it works perfectly. You must have a wrong range reference or you did not enter the formula in your spreadsheet the way I showed it, or, there is a difference in international settings between yours and mine. In any case, the formulas work, and something on your end is happening to cause the zero to be returned.
The formula also returns 0 if there are matching values. Referenced in below (tried adding screen shot and wouldn’t work):
J20 Returns value 0 as a result of F23 & F26 containing the same Price.
Are you aware of a possible solution in order to return both results (i.e. CONCAT the values with a comma between)?
D35:D38 “Apple Pie”
D39:D42 “Banana Pie”
D43:D46 “Orange Juice”
*Repeats, ending at E46*
F39 Not Offered
F40 Not Offered
*Array formula copied down to H25*
I18 MIN Price
*Array formula copied down to I25*
*Array formula copied down to J25*
There are large and clunky formulas that can do this but their practicality in my opinion is not worth their value, especially when the count of a given item’s repeatedness is unknown. I would go for a UDF that is easier to manage and is more flexible to accommodate any number of unknown repeats of a given item.
What would I do if I wanted to perform a vlookup but return the highest value for that person? Names in column A, Numbers in column B.
Amy 1, Amy 4, Amy 6, Bob 3, Bob 9, Bob 2 etc.
I want to lookup Amy’s highest value for example. What would my function look like?
Any help would be appreciated!!
See if this picture helps you (edit the formula to fit your actual ranges):
..or this picture (edit the formula to fit your actual ranges):
What is the formula from F4:F6 ? I cannot seem to find how to make the table show the adicacent cell that represemts the location of the result represented by H4-H6.
I assume your question relates to the picture with Store #1 in cell F4, Store #2 in cell F5, and Store #3 in cell F6. That is the only picture with data in range F4:F6 that you asked about.
There are no formulas in those cells; those labels are manually entered.
Is there a way to index for non-zero. Anyone with a zero would be assumed to be a non-participant, so I just want index those that have a score above zero.
*index the minimum non-zero score
Just getting to this after being out last week.
What exactly do you mean by “index”?
Give a small sample of your data, your criteria, and your expected result and we can take it from there.