Forum Discussion
dlcartin
Aug 29, 2024Iron Contributor
Need Formula for P/L for sale of a stock
I have a Table of stocks that I buy & sell. I need a Formula that will subtract my 'Sell Price' from my 'Buy Price' showing me any P/L that occurred once it has been sold (I don't do multiple buys of...
- Aug 31, 2024
Perhaps
=IF([@UNITS]>0, 0, IF( [@SYMB]="", "", SUMPRODUCT( ([@DATE] >= [DATE] )* ([@SYMB] = [SYMB])* -[UNITS]* [$/Share] ) ) )
dlcartin
Aug 30, 2024Iron Contributor
I uploaded a copy. It's titled 'MM Acct.xlsx'. Hope this helps. Thanks to everyone!!
SergeiBaklan
Aug 31, 2024Diamond Contributor
Perhaps
=IF([@UNITS]>0, 0,
IF( [@SYMB]="", "",
SUMPRODUCT(
([@DATE] >= [DATE] )*
([@SYMB] = [SYMB])*
-[UNITS]*
[$/Share]
)
) )