Vlookup with minimum value match

canderson41

New Member
Joined
Aug 14, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
I'm trying to come up with a solution for using a preference cell mixed with a vlookup match. I want the result to be the value cell for each unique item with the lowest preference value. I'm not sure if Vlookup is the best function or not, so any suggestions would be helpful.

ItemPreference (Lowest is Best)ValueItemValue
Apples
1​
6​
Apples
6​
Bananas
2​
7​
Bananas
7​
Pineapple
4​
5​
Pineapple
5​
Oranges
1​
3​
Oranges
3​
Apples
2​
10​
Bananas
3​
7​
Pineapple
9​
10​
Oranges
2​
5​
Apples
3​
4​
Apples
4​
9​
Pineapple
11​
1​
Oranges
3​
8​
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
1660514515378.png
 
Upvote 0
Solution
Maybe.
Book2
ABCDEF
1temPreference (Lowest is Best)ValueItemValue
2Apples16Apples6
3Bananas27Bananas7
4Pineapple45Oranges3
5Oranges13Pineapple5
6Apples210
7Bananas37
8Pineapple910
9Oranges25
10Apples34
11Apples49
12Pineapple111
13Oranges38
Sheet1
Cell Formulas
RangeFormula
E2:E5E2=SORT(UNIQUE(A2:A13))
F2:F5F2=FILTER($C$2:$C$13,($A$2:$A$13=E2)*($B$2:$B$13=MINIFS($B$2:$B$13,$A$2:$A$13,E2)))
Dynamic array formulas.
 
Upvote 0
Maybe.
Book2
ABCDEF
1temPreference (Lowest is Best)ValueItemValue
2Apples16Apples6
3Bananas27Bananas7
4Pineapple45Oranges3
5Oranges13Pineapple5
6Apples210
7Bananas37
8Pineapple910
9Oranges25
10Apples34
11Apples49
12Pineapple111
13Oranges38
Sheet1
Cell Formulas
RangeFormula
E2:E5E2=SORT(UNIQUE(A2:A13))
F2:F5F2=FILTER($C$2:$C$13,($A$2:$A$13=E2)*($B$2:$B$13=MINIFS($B$2:$B$13,$A$2:$A$13,E2)))
Dynamic array formulas.
This is strange.... If I copy your entire sheet and paste it, it works. If I just copy the formulas I get a !CALC error. In either case, I believe this solves my issue. Thank you!
 
Upvote 0
@gargamalebarbosa ,
I think your formula should work if you add the MATCH type to equal 0.
INDEX($C$2:$C$13,MATCH(1,($A$2:$A$13=E2)*MIN($B$2:$B$13),0),0)
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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