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...
- Dec 16, 2022
That's weird. When I create such a formula in the Dutch version of Excel Online, it also inserts a semicolon - see 1.
But when I remove the semicolon, the formula works as intended - see 2.
 
dlcartin
Aug 30, 2024Iron Contributor
I uploaded a copy. It's titled 'MM Acct.xlsx'. Hope this helps. Thanks to everyone!!
SergeiBaklan
Aug 31, 2024MVP
In addition, if you'd like to deduct possible fees
=IF([@UNITS]>0, 0,
IF( [@SYMB]="", "",
SUMPRODUCT(
([@DATE] >= [DATE] )*
([@SYMB] = [SYMB])*
-[UNITS]*
[$/Share]
) -
SUMPRODUCT(
([@DATE] >= [DATE] )*
([@SYMB] = [SYMB])*
[FEE(S)]
)
) )
and cosmetic, it's better to apply "comma style" format to P/L column