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] ) ) )
Tejas_shah
Aug 29, 2024Brass Contributor
dlcartin
You can try below formula in column K
=IF(E3="Sell","",XLOOKUP(C3&"Sell",$C$3:$C$9&$E$3:$E$9,$I$3:$I$9,0))
You can try below formula in column K
=IF(E3="Sell","",XLOOKUP(C3&"Sell",$C$3:$C$9&$E$3:$E$9,$I$3:$I$9,0))
- dlcartinAug 29, 2024Iron ContributorI edited my post to give a (hopefully) better understanding of what I presently have vs what I need. You state to enter your Formula into COL 'K', nut I need the results in COL 'J', so that's where I placed it (Cells J3:J9). After entering your Formula the above pic shows your formula's results. Thank you for being so kind as to reply to my post even though it's not the results that I want/need. Have a Blessed Life and thank you, again.
P,S, Perhaps I'll able to modify your Formula to get the results I need.