calculate 2 cells,never negative

G

Guest

hello

I want to calculate two cells, and when the outcom is positive then just
show the calculation. On the other hand when the calculation is negative it
must give 0 as a result.
So it's never a <0 figure
What do I use.

Thx in advance
 
B

Bob Phillips

=MAX(0,SUM(A1,B1))


just change the calculation part to whatever you are doing.
--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
P

Pete_UK

Don't know what you mean by "calculate two cells", but this will give
you what you want:

=MAX(0,your_calculation)

Hope this helps.

Pete
 
G

Guest

Hello pete/bob

I think i wrote badly what i want
example:



10-5=5
10-9=1
10-10=0
10-12=0

as soon the outcom is <0 it's given a zero

thx for your help
 
B

Bob Phillips

which is what we both gave you.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
P

Pete_UK

You are obviously subtracting one cell from another - assume these are
A1 and B1, then the formula becomes:

=MAX(0,A1-B1)

or maybe:

=MAX(0,B1-A1)

Hope this helps.

Pete
 

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