Let's say you gave the number 5 in cell A1 and the number 6 in cell B1.
Your formula is in cell C1, =A1-B1 with gives you -1. If you wrap that
formula in an If statement, you can force it to zero:
=IF(A1-B1<0,0,A1-B1)
You are simply saying that if the difference between A1 and B1 is less than
zero, evaluate as zero, otherwise give the positive difference.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.