Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 29
Default Looking up the value corresponding to the last repetition in a ran

Essentially, I need to do a reverse-lookup; rather than finding the first
instance in a range, I need to find the last.

My ColA contains a list of twenty repeating names, and ColB contains a
number corresponding to each instance of a name. I'm trying to look up the
value in ColB corresponding to the last instance of a given name. For
instance, if my columns are such:

ColA | ColB
Bob | 1
Steve | 12
Mary | 41
Bob | 68
Mary | 3
Mary | 15
Steve | 72
Bob | 9

.... and I provide "Bob", I'd like to return the value 9; if I provide
"Mary", I'd like to return the value 15.

Thanks!

Cell C1 will hold the name I'm providing.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Looking up the value corresponding to the last repetition in a ran

Try this:

=LOOKUP(2,1/(A2:A9="Bob"),B2:B9)


--
Biff
Microsoft Excel MVP


"PaladinWhite" wrote in message
...
Essentially, I need to do a reverse-lookup; rather than finding the first
instance in a range, I need to find the last.

My ColA contains a list of twenty repeating names, and ColB contains a
number corresponding to each instance of a name. I'm trying to look up the
value in ColB corresponding to the last instance of a given name. For
instance, if my columns are such:

ColA | ColB
Bob | 1
Steve | 12
Mary | 41
Bob | 68
Mary | 3
Mary | 15
Steve | 72
Bob | 9

... and I provide "Bob", I'd like to return the value 9; if I provide
"Mary", I'd like to return the value 15.

Thanks!

Cell C1 will hold the name I'm providing.



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
Random number with no repetition? Terry Pinnell Excel Discussion (Misc queries) 2 June 10th 07 11:10 AM
repetition cases Omar Excel Discussion (Misc queries) 2 May 9th 07 09:17 PM
PivotTable - Repetition of rows sailor-1 Excel Discussion (Misc queries) 1 January 5th 07 03:41 PM
check for repetition of cell contents David Excel Worksheet Functions 1 September 14th 06 09:31 AM
statistical analysis / trend repetition nastech Excel Discussion (Misc queries) 1 April 28th 06 01:03 AM


All times are GMT +1. The time now is 05:12 PM.

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

About Us

"It's about Microsoft Excel"