MIN inside of VLOOKUP?

samilynn

Board Regular
Joined
Jun 24, 2003
Messages
166
Office Version
  1. 2016
Platform
  1. Windows
Is it possible to use VLOOKUP with the MIN function?
See example below, I want to (on another worksheet), get the values $0.80 and $4.75 respectively, for the two products listed.
I feel it should be easy, but my brain is stuck!!
Thank you,
Sam

PRODUCT
QTY​
PRICE​
QTY​
PRICE​
QTY​
PRICE​
A123
10​
$1.00​
50​
$0.90​
100​
$0.80​
B444
10​
$5.00​
20​
$4.75​
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
I don't think you'll need a VLOOKUP function, at least based on what I can see here.

This should work.
=MINIFS($B3:$G3,B$1:G$1,"Price")
 
Upvote 0
Thanks, Johnny, but the product number is in a separate spreadsheet, and that's where I need to input the formula.

Is there a way to modify the MINIFS so it can work across spreadsheets?

Thanks,

Samantha
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Thank you for the suggestion, Fluff, it makes sense. I just did that, thanks again

Sam
 
Upvote 0
Thanks for that.
Could you have a situation where the minimum value in a row is the Qty rather than the price?
 
Upvote 0
The best I can come up right now is

=MIN(VLOOKUP(A2,Sheet1!A2:G3,{3,5,7},FALSE)) and then after putting that in your cell, do a CTRL+SHIFT+ENTER to turn it into an array.

The thing to keep in mind is that the {3,5,7} part is the column numbers, counting left to right, from your first column (the PRODUCT). Each time you get a new Price column added to the end, you will need to add the column number, which the next one would show as {3,5,7,9}. And then do the CTRL+SHIFT+ENTER again.

Their may be an even better way of doing this.
 
Upvote 0
Solution
Johnny, that works PERFECTLY!! Thank you so much,

Samantha
 
Upvote 0
Two other options.
If the price will always be the smallest value in the row
Excel Formula:
=MIN(INDEX(Sheet1!B2:G10,MATCH(A13,Sheet1!A2:A10,0),))
or if the qty could be the lowest value
Excel Formula:
=AGGREGATE(15,6,INDEX(Sheet1!B2:G10,MATCH(A13,Sheet1!A2:A10,0),)/(Sheet1!B1:G1="Price"),1)
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,638
Members
449,093
Latest member
Ahmad123098

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top