Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,814
Default Can VLookup return the LAST value in a range?

If I have a list:
A 10
B 3
C 5
A 8
D 6

How can I get VLookup to return to value associated with the last occurance
of A instead of the first (i.e the value 8)?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Can VLookup return the LAST value in a range?

One way, array-entered* in say, C1:
=INDEX($B$1:$B$10,MATCH(MAX(IF($A$1:$A$10="A",ROW( $A$1:$A$10))),IF($A$1:$A$10="A",ROW($A$1:$A$10)),0 ))

*press CTRL+SHIFT+ENTER to confirm the formula

Adapt the ranges to suit
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Steve" wrote:
If I have a list:
A 10
B 3
C 5
A 8
D 6

How can I get VLookup to return to value associated with the last occurance
of A instead of the first (i.e the value 8)?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 783
Default Can VLookup return the LAST value in a range?

Max wrote:
One way, array-entered* in say, C1:
=INDEX($B$1:$B$10,MATCH(MAX(IF($A$1:$A$10="A",ROW( $A$1:$A$10))),IF($A$1:$A$10="A",ROW($A$1:$A$10)),0 ))

*press CTRL+SHIFT+ENTER to confirm the formula

Adapt the ranges to suit


Assumin that the list in A1:B5, if the functions in the
freelydownloadable file at http://home.pacbell.net/beban are available
to your workbook

=INDEX(VLookups("A",a1:b5,2),2)

Alan Beban
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Can VLookup return the LAST value in a range?

Another one:
=LOOKUP(2,1/(A1:A5="a"),B1:B5)



Steve wrote:

If I have a list:
A 10
B 3
C 5
A 8
D 6

How can I get VLookup to return to value associated with the last occurance
of A instead of the first (i.e the value 8)?


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup to Return a Range of Data James Excel Discussion (Misc queries) 0 July 13th 06 09:44 PM
Vlookup to Return a Range of Data Rob Excel Discussion (Misc queries) 13 June 1st 06 04:02 AM
How do I return the row for a value I VLOOKUP? fryerfarm Excel Worksheet Functions 2 December 1st 05 09:40 PM
How do I sum a range which includes the "#N/A" VLOOKUP return valu Sailor Excel Worksheet Functions 6 May 9th 05 08:46 AM
Vlookup - return row no. instead of value automne Excel Discussion (Misc queries) 2 March 7th 05 12:38 AM


All times are GMT +1. The time now is 03:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"