Find maximum price of unsold stock in stock portfolio?

UDAEY

New Member
Joined
Oct 31, 2017
Messages
5
I am a small investor in Shares/ Stocks in Indian Share Market. I have used excel to create stock portfolio. I have bought a few quantity of stocks of Company XYZ at various dates, at various prices and in various quantities. For profit calculation for tax purpose, I am required to use “First In First Out”. Tax is 0 (zero), if i sell the stock after holding for more than 1 year.

Now my problem is that I want the maximum price of the unsold Stock/ Share. Please see following image.

CompanyTransactionDateQuantityPriceAmount
XYZBuy05-01-20141040.00400.00
XYZBuy06-01-20151050.00500.00
XYZBuy07-02-20152046.00920.00
XYZBuy09-02-20151047.00470.00
XYZBuy08-02-201655.0025.00
XYZSell08-02-2017-3055.00-1650.00
XYZBuy08-05-2017245.0090.00
XYZSell10-09-2017-560.00-300.00

<tbody>
</tbody>

Today, If I want to sell the stock at profit, the current price of the stock should be more than the purchase price of the first unsold stock. Since I have purchased various quantities on various dates and at various prices, I want the maximum purchase price of the unsold stock. In the above example, the unsold stocks are 5 (purchased on 07-02-2015) and the rest 22 (purchased after 07-02-15). Is there any simple excel formula or trick to enable me to calculate the maximum price of the unsold Stock/ Shares.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I can only see 17 purchased after 07-02-15, not 22.

Anyway, one way might be to record sales against the original purchase lines somehow.
You can then track how many of each purchase are still owned, and show their price IF they are still owned.
 
Upvote 0
I can only see 17 purchased after 07-02-15, not 22.

Anyway, one way might be to record sales against the original purchase lines somehow.
You can then track how many of each purchase are still owned, and show their price IF they are still owned.
You are right. My mistake. It should be 17 and not 22.
 
Upvote 0

Forum statistics

Threads
1,214,391
Messages
6,119,247
Members
448,879
Latest member
oksanana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top