Conditional Formula [Note: The "net profit" here is not accumulating]
Sorry! I forget to say.
The "net profit" here is not accumulating.
xx/xx----2----------------##--------------2--------------125---------- ##
xx/xx----##---------------1---------------1--------------150---------- ##
xx/xx----##---------------1---------------0--------------165---------- +65
Only the above entries is counted for the calculation of net profit/loss, ie 65.
xx/xx----##---------------4--------------(4)-------------170--------- ##
xx/xx----2----------------##-------------(2)-------------165---------- ##
xx/xx----##---------------1--------------(3)-------------180---------- ##
xx/xx----3----------------##--------------0--------------180---------- (10)
Only the above entries is counted for the calculation of net profit/loss, ie
(10).
Each of my tables is flexible. They vary in number of entries.
How can I tell the formula to group the entries and calculate each "net
profit/loss" separately?
Thank you.
--
Additional info about my computer:
- Office XP
- Windows XP Pro
"Bob Phillips" ¦b¶l¥ó
¤¤¼¶¼g...
I get 55 as the final profit loss not (10), but try this in F2, and copy
down
=IF(D2=0,SUMPRODUCT($C$2:C2,$E$2:E2)-SUMPRODUCT($B$2:B2,$E$2:E2),"")
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"0-0 Wai Wai ^-^" wrote in message
...
Here's the table for one game
Date-----Buy(Unit)-----Sell(Unit)-----Net Unit-----Price($)-----Net
Profit/Loss($)
xx/xx----2----------------##--------------2--------------125---------- ##
xx/xx----##---------------1---------------1--------------150---------- ##
xx/xx----##---------------1---------------0--------------165---------- +65
xx/xx----##---------------4--------------(4)-------------170--------- ##
xx/xx----2----------------##-------------(2)-------------165---------- ##
xx/xx----##---------------1--------------(3)-------------180---------- ##
xx/xx----3----------------##--------------0--------------180----------
(10)
Number in bracket means negative.
## means empty cell.
How can I type a formula, so that every time there's no stock left (ie
zero net
unit), it will calculate the net profit once.
Any workaround is also appreciated.
Thank you.
|