VLookup to return MAX value from multiple hits

crackod93

Board Regular
Joined
Aug 9, 2007
Messages
71
Hi, can anyone help me with the below...

Im looking for a vlookup formula which will give me the maximum number from a list which contains multiple matches, i.e.

Lookup number 1 from column A, then give me the largest number from column B

example table:
A B
-----
1 5
2 2
1 11
3 2
4 5

the result would be 11

thanks all!
 
Have you used Ctrl+Shift+enter to confirm the formula? You'd see curly brackets {} around it (don't type these).
Also, I've not checked this out but it might be that the formula doesn't work if the ranges are in other (possibly closed) workbooks.
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hello

Try:

=MAX(IF(A1:A100=1,B1:B100))

Commit the formula with CONTROL+SHIFT+ENTER (not just ENTER). If correcly committed the formula will be surrounded with braces {}.

Also, do not use whole columns , e.g. A:A and B:B.


That was really helpful but I'm curious why excel requires the braces to make the formula work, Why it just work that way,:eek: I'm want to know the actual reason.
 
Upvote 0
That was really helpful but I'm curious why excel requires the braces to make the formula work, Why it just work that way,:eek: I'm want to know the actual reason.

The { } indicate that it is an array formula. The IF() function naturally only works with single cell references. To make it work with multi-cell references, it must be entered as an array formula. Excel adds the {} to show that you have entered an array formula correctly.

Array formulas are entered by pressing CTRL+SHIFT+ENTER at the same time.
 
Last edited:
Upvote 0
I think life is more simple than this....Though Microsoft named excel as "sheet/****", it's mostly garbage in=garbage out...

Probably a quick sorting by the max number and then doing a vlookup will lead to a faster result since vlookup only takes the first top row result..
Hope it helps
 
Upvote 0

Forum statistics

Threads
1,215,471
Messages
6,125,000
Members
449,202
Latest member
Pertotal

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