ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VLOOKUP returning LAST match (https://www.excelbanter.com/excel-discussion-misc-queries/20415-vlookup-returning-last-match.html)

Brian Ferris

VLOOKUP returning LAST match
 
Hi guys,

Lets take this scenario:

Brian 20
Michael 30
Ivan 40
Brian 30
Ivan 60
Michael 70

I want to apply a vlookup on this list but return the last
value i.e. Brian 30, Ivan 60 & Micahel 70

I tried the -1 instead of the 0 in the last field of the
formula but this still did not work correctly.

Any suggestions ..???

Thanks,
Brian



Dave Peterson

=vlookup() will return the value from the first match.

But this seems to work ok for me:

=LOOKUP(2,1/(A1:A10="michael"),B1:B10)





Brian Ferris wrote:

Hi guys,

Lets take this scenario:

Brian 20
Michael 30
Ivan 40
Brian 30
Ivan 60
Michael 70

I want to apply a vlookup on this list but return the last
value i.e. Brian 30, Ivan 60 & Micahel 70

I tried the -1 instead of the 0 in the last field of the
formula but this still did not work correctly.

Any suggestions ..???

Thanks,
Brian


--

Dave Peterson


All times are GMT +1. The time now is 04:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com