Find last date of sold stock and sold price.

B

bob

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.
 
D

Don Guillett

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.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top