Subtraction of 2 numbers/cells

C

Cipri

Could anyone please help me with this situation (in Excel 2003):
I have 2 cells
A1 = 0 and B1 = 10
In cell C1 i put this formula C1=A1-B1 . Now the answer will be C1=
-10 but my question is:
Is there a formula to calculate in C1 the result if the answer is positive
and if the answer is negative to put 0?

Thank you in advance.
 
×

מיכ×ל (מיקי) ×בידן

Try one of two:
=(A1-B1)*(A1>B1)
=(A1-B1)*(A1>=B1)
Micky
 
C

Cipri

It worked your solution and in the mean time i found another one that works
too :)
if(A1<B1,"0",A1-B1)

Thx dude
 
B

Bernard Liengme

But do not put the zero in quotes, that will make it text
if(A1<B1,0,A1-B1)
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