Conditional Formula - calculate only if net unit is zero [modified]
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.
Group A:
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.
Group B:
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).
Group C, D, E, F... ...
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?
The "net profit" is calculated every time when there's no stock left (ie zero
net
unit). The "net profit" does not accumulate!
Any workaround is also appreciated.
Thank you.
--
Additional info about my computer:
- Office XP
- Windows XP Pro
|