View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default Find last date of sold stock and sold price.

try
=INDEX(D:D,MATCH(B4,B:B))

On Feb 18, 8:11*pm, bob wrote:
This problem is tricky as there can be more than one stock sold on
same day, also there can be more than one company sold on that day.
A * * * * * * *B * * * * * * *C
Co. Sym Date sold * * * Price
---------------------------------------
F * * * * * * * 01/06/12 * * * *11.77
F * * * * * * * 01/06/12 * * * *11.56
JBLU * *01/06/12 * * * * *5.44

I have used the following Formulas with only partial success.
INDEX(A4:C6,MATCH(A4,A4:A6,MATCH(B4,B4:B6,0)),3)

And Also
SUM(IF(A4:A6=A4,IF(B4:B6=B4,C4:C6)))

Each works partially. For example, the second Sum(If finds the correct
price for JBLU, but adds the two prices for F. I want only the last
sold price. If the dates were different, the solution would be easy.
However, many times more than one stock is sold on the same date and
at times, multiple lots of the same company symbol.

Also, I use another Column to find the Largest or Max date which is
then substituted for the dates in column B. I show my example for a
solution because an expert probably has a quick fix without using an
extra column for solving my problem.

Thank you in advance for any help someone can offer.