Vlookup() to return smallest value in a range ?

jxb

Board Regular
Joined
Apr 19, 2007
Messages
172
Office Version
  1. 2010
Platform
  1. Windows
Is there a way of returning the smallest value using some sort vlookup()?
Consider the following (see xls picture);
I am looking at a cell where the user selects which ID if wants the smallest values for (in this example min B2:D4)
I guess I am looking at way of have a dynamic range in the vlookup(). Maybe a need for Index or sometign along this line ?

Thanks
John
aa - Copy.PNG
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Book1
ABCD
1IDValue 1Value 2Value 3
21123
31456
4150.52.5
52123
62456
7250.252.5
8
9User Choice =1
10min value =0.5
Sheet3
Cell Formulas
RangeFormula
B10B10=MIN(IF(A2:A7=B9,B2:D7))
 
Upvote 0
Thanks. If I try I get: #VALUE!
 
Upvote 0
Try entering as an array formula - press Ctrl+Shift+Enter

Book1
ABCD
1IDValue 1Value 2Value 3
21123
31456
4150.52.5
52123
62456
7250.252.5
8
9User Choice =1
10min value =0.5
Sheet3
Cell Formulas
RangeFormula
B10B10=MIN(IF(A2:A7=B9,B2:D7))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Solution
Another option that doesn't need array entry
Excel Formula:
=AGGREGATE(15,6,B2:D7/(A2:A7=B9),1)
 
  • Like
Reactions: jxb
Upvote 0
Another option that doesn't need array entry
Excel Formula:
=AGGREGATE(15,6,B2:D7/(A2:A7=B9),1)
sorry missed your reply when I ticked the array-way as a solution. Never used AGGREATE() so will look into it. Thanks for the input
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,734
Messages
6,126,545
Members
449,317
Latest member
chingiloum

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