View Single Post
  #9   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.

Sorry, there is no =index() in that formula (I was distracted and lost my train
of thought!).

It just uses that number to return the value in sheet1!b1:b999 for that row.

(ps. change any sheet2's to sheet1's, too.)

dev wrote:

This is working on the sample data mentioned by me. But, this is not working
on the actual data.

Could you please give brief explaination of the value of each argument which
you have passed into the LOOKUP function.

Thanks and Regards,
Dev

"Dave Peterson" wrote:

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


--

Dave Peterson