Help Needed ASAP

C

casst

I need to subtract one cell from another cell. However, I don't want to see
any negative numbers, instead I only want a zero. For example:

If A2 is 300 and B2 is 150 than C2 should be 150
If A3 is 150 and B3 is 300 than C3 should be 0 (not -150)

Is this possible, and if so, how do I write the formula.

Thanks
 
B

Bernard Liengme

=IF(A2-B2>0,A2-B2,0)
OR
=IF(A2>B2,A2-B2,0)
OR
=IF(A2-B2,A2-B2,0) ' A positive value is treated as TRUE
OR
=(A2<B2)*(A2-B2)
best wishes
 

Ask a Question

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.

Ask a Question

Top