View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB
 
Posts: n/a
Default lookup latest entered match

One way (array entered, must confirm w/Control+Shift+Enter)

=INDEX(C1:C6,LARGE((A1:A6="fred")*ROW(INDIRECT("1: "&ROWS(A1:A6))),1))

If you have more than two matches and want to return one in between,
changing the 1 at the end (second argument of the LARGE function) to 2 will
return the second to last, etc. You can also change LARGE to SMALL (it works
the same way, but will start counting from the beginning of your data).


"Smugga" wrote:

I am trying to lookup the last entry of a name in an array. For example:

A B C
1 Fred 5 1/5/05
2 Barbey 4 1/6/06
3 Betty 10 2/12/06
4 Fred 7 5/15/06
5 Wilma 7 6/1/06
6 Dino 2 6/12/06

=vlookup("Fred",a1:c4,3,1) will only give me the first "Fred" date (1/5/05)
in column C. I am looking for a way to return the last entered "Fred".