Reputation: 39
I have imported data from an outside source into Excel. The data comes as "Profit" in one single column. However, it contains both profit and loss numbers. In order to provide a true analysis, I must be able to separate the data and recognize which cells are profit and which are losses. Below are screenshots of two different sheets of what I have developed so far, but hit a road block.
I am trying to take the profit/loss in Column R from the top picture, and calculate these on spreadsheet to (4 Hour) results for G8 & I8 on the bottom picture. If I can do this, all other calculations will be successful. I have not been able to get this to operate properly. Any answers would be appreciated.
Upvotes: 0
Views: 1767
Reputation: 19289
My assumptions are that a) cell formatting has been applied to remove the - from negative numbers and colour them red. And b) loss is negative and profit is positive.
Based on the fixed ranges of the example supplied, profit is calculated by:
=SUMIF(B2:B11,">=0",B2:B11)
And loss is calculated by:
=SUMIF(B2:B11,"<=0",B2:B11)
Test workings:
Upvotes: 1