Active Member
March 23, 2021
How to add realized gain/loss to the Stock Portfolio Dashboard?14
Active Member
March 23, 2021
Hi Mynda-
A sample Excel file is attached. You can see several examples of
Unrealised gain where the formulas follow your example
Realised gain (MCD, NVDA, TSLA, and VEEV) where I made a stab at it by an IF statement that only calculates gain/loss when SHARES > 0. This in turn disclosed that with fractional shares, a add and subtract in the same amount (example: MCD 0.62073) shares doesn't calculate to exactly zero.
And I could figure out a formula for a stock that has both open and closed positions (example AMZN) so I did it by a one-time formula.
-Mike
July 16, 2010
Doh, I misread the year! I shouldn't answer questions at night after a long day 🙂
You can add a Status column to the ledger that marks shares as sold. Then you can add a criteria to your Unrealised and Realised Gain/Loss SUMIFS that only include transactions marked as open or sold respectively. If you only sell part of a holding, then you'd need to split the transaction into two rows, one for the sold shares and one for the shares you still hold.
Hope that makes sense. See example attached.
Mynda
1 Guest(s)