Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
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.
3 Answers
- SteveLv 57 years agoFavorite 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@XLLv 77 years ago
=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)))
- 7 years ago
it took out some of your answer.. can you retype it.. but put in a few spaces so I can see the entire thing?