Vlookup Return Minimum Value

Beachson

Active Member
Joined
Oct 28, 2009
Messages
468
Here is my starting Vlookup Formula I. I need to alter it as I will state after the formula...

Code:
=Vlookup(A2,REPORT!$A$2:$D$10000,4,0)

Instead of returning the data from column D upon the first match I need the smallest available number to be returned. There will be more than one match and they will all have different numbers to return so I need the smallest return from D.

So in "REPORT" there is many duplicates in Columns A but they all have different values in Column D and I need to return the smallest number from Column of all of those duplicates in Column A. Thanks!
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Try this array formula enterd with CTRL + SHIFT + ENTER

=MIN(IF(REPORT!$A$2:$A$10000=A2,REPORT!$D$2:$D$10000))

Hope that helps.

Note, if there are blank results of the vlookup, they will be counted as 0.
It can be adjusted if needed..
 
Upvote 0
It returned one number for everything. It seems that it returned the smallest number from Column D in general but I need the smallest return for each specific match... ?
 
Upvote 0
It returned one number for everything. It seems that it returned the smallest number from Column D in general but I need the smallest return for each specific match... ?

Make sure you enter the formula with CTRL + SHIFT + ENTER

After entering the formula, highlight the cell with the formula and press F2
Then Press CTRL + SHIFT + ENTER

When entered correctly, the formula will be enclosed in {brackets}
 
Upvote 0
I need the smallest return for A2 but I only want to consider Values in Column D when A2 matches say maybe 10 Cells in column A of the other sheet. Not the smallest number in general from Column D

So if the lookup in A2 of sheet 1 is Dog and in sheet 2 there is 5 Cats and 5 Dogs and the values for the 5 dogs is (1,2,3,4,5) I want it to match dog and pick the smallest available number (1)
 
Upvote 0
Try this array formula enterd with CTRL + SHIFT + ENTER

=MIN(IF(REPORT!$A$2:$A$10000=A2,REPORT!$D$2:$D$10000))

Hope that helps.

Note, if there are blank results of the vlookup, they will be counted as 0.
It can be adjusted if needed..

How would you adjust for zero?

Also is there any reason this wouldn't work?

Code:
{=MIN(IF(NewData!$E$2:$E$17076=A2,NewData!$J$2:$J$17076),IF(OldData!$B$2:$B$816=A2,OldData!$D$2:$D$816))}

I'm having it search both the old and new data and give me the lowest data between two different sheets?
 
Upvote 0
Ok got it thanks very much!

=Vlookup(A2,REPORT!$A$2:$D$10000,4,0)

Instead of returning the data from column D upon the first match I need the smallest available number to be returned. There will be more than one match and they will all have different numbers to return so I need the smallest return from D.

So in "REPORT" there is many duplicates in Columns A but they all have different values in Column D and I need to return the smallest number from Column of all of those duplicates in Column A. Thanks!

I need the smallest return for A2 but I only want to consider Values in Column D when A2 matches say maybe 10 Cells in column A of the other sheet. Not the smallest number in general from Column D
So if the lookup in A2 of sheet 1 is Dog and in sheet 2 there is 5 Cats and 5 Dogs and the values for the 5 dogs is (1,2,3,4,5) I want it to match dog and pick the smallest available number (1)
 
Last edited by a moderator:
Upvote 0
That's exactly what the formula in post#2 does.
 
Upvote 0

Forum statistics

Threads
1,214,561
Messages
6,120,231
Members
448,951
Latest member
jennlynn

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