As the title says - I have a table which calculates the average of some buys and the number of units bought.
647 represents the sum of those entries, without adding the positions sold. But if I sell something, I need to subtract the qty from the sum, not adding it is not enough.
How can I subtract the ones with sell?
The current formula for that cell is
=SUMIF(O3:O13, "BUY", K3:K13)
but as I said, I need to subtract what was sold.
How should I edit my formula accordingly?