View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Searching specific record using VLOOKUP function.

With IT1 in A1 of Sheet2 and your data in A1:B999 of sheet1, this returned the
value for the last IT1 in the list:

=LOOKUP(2,1/(Sheet1!A1:A999=A1),Sheet1!B1:B999)

(Make that 999 big enough to extend past the last possible row--but don't use
the whole column.)

dev wrote:

My table is not sorted and it has multiple entries for a search criteria. I
want last entry to be picked up by vlookup. Is there any way to do that? Or
can vlookup search from the bottom of the table? This will also solve my
problem.
e.g.
Item Price
it1
it2 32
it3
it1
it4 44
it1 11
it3 20

So, there can be multiple entries for an item but only one entry will have
Price (Price will be blank for all other entries of that item). This entry
will be the last occurrence of that item in the table. I want price of that
occurrence.


--

Dave Peterson