Selecting The Max value with VLOOKUP

DOLANDEE

New Member
Joined
Sep 9, 2015
Messages
3
Good day all,

I'm having difficulty selecting the Max value using VLOOKUP: eg.

[TABLE="width: 181"]
<tbody>[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[/TR]
[TR]
[TD="align: center"]200[/TD]
[TD="align: center"]50 g[/TD]
[/TR]
[TR]
[TD="align: center"]300[/TD]
[TD="align: center"]100 g[/TD]
[/TR]
[TR]
[TD="align: center"]323[/TD]
[TD="align: center"]150 g[/TD]
[/TR]
[TR]
[TD="align: center"]346[/TD]
[TD="align: center"]200 g[/TD]
[/TR]
[TR]
[TD="align: center"]369[/TD]
[TD="align: center"]300 g[/TD]
[/TR]
[TR]
[TD="align: center"]392[/TD]
[TD="align: center"]300 g[/TD]
[/TR]
[TR]
[TD="align: center"]550[/TD]
[TD="align: center"]350 g[/TD]
[/TR]
[TR]
[TD="align: center"]425[/TD]
[TD="align: center"]400 g[/TD]
[/TR]
[TR]
[TD="align: center"]33[/TD]
[TD="align: center"]450 g[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]500 g[/TD]
[/TR]
</tbody>[/TABLE]
I want to get the value in column "B", for the max value in column "A".

I used this formula, =VLOOKUP((MAX(A1:A10)),A1:B10,2), but it gives me the max value in column "B" if there is a value less than the max value in column "A" after it, however it works fine if there is a zero value after the max value it.

So basically, I'm getting an answer of "500 g" for this, but the correct answer should be "350 g"

...any thoughts on how is this achieved?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Welcome to the forum.

Try

=VLOOKUP((MAX(A1:A10)),A1:B10,2,0)

The zero tells it to find an exact match.
 
Upvote 0
can try this instead

=INDEX(B1:B10,MATCH(MAX(A1:A10),A1:A10,0))
 
Upvote 0
Forget it guys, a colleague in my office answered me:

=VLOOKUP((MAX(A1:A10)),A1:B10,2, FALSE) is the correct formula
 
Upvote 0
I was too slow on the draw there too! I didn't expect replies so soon...Thanks a lot guys...very helpful
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
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