excel question about IF statement?

I have an IF statement that works.. but I need the answer to put a zero in the cell if it is negative. If the answer to the IF statement is positive.. then I want the actual answer.

=IF(sum(F7:F10)<0,D11+sum(F7:F10),D11-sum(F7:F10))

right now.. this statement adds F7 through F10 to see if it negative or not. if that sum is negative.. then it adds F7:F10 with the amount in D11. At this point.. if that answer is negative.. I need '0' in the cell, otherwise, I just need the answer

if the sum of f7;f10 is positive.. then it should take the number is d11 and subtract the sum of f7;f10 from it.. and again.. if the answer is negative.. I need '0' in the cell, otherwise, I just need the answer.

Also, if you see an easier way to do the calculation.. I am open to suggestions. but everything works right now with the exception that I can not have a final negative number.

Steve2014-06-23T17:50:12Z

Favorite Answer

You need another if statement around your current one:

=IF( IF (sum(F7:F10)<0,D11+ sum(F7:F10),D11-s um(F7:F10)) < 0, 0, IF (sum(F7:F10)<0,D11+ sum(F7:F10),D11-sum(F7:F10)))

IXL@XL2014-06-23T21:16:35Z

=IF(AND(SUM(F7:F10)<0, D11+SUM(F7:F10)<0),0, IF(AND(SUM(F7:F10)=0, D11-SUM(F7:F10)<0),0, D11+SUM(F7:F10)))

pattiebear2014-06-23T17:59:05Z

it took out some of your answer.. can you retype it.. but put in a few spaces so I can see the entire thing?