IF Statement help

H

help!

=IF((C29-C26)>=0,C29-C26,0)
This a IF statement that returns a decrease in an amount with a positive
number

I used:
=IF((C29-C26)<=0,C29-C26,0) for the increase in amount, however if there is
an increase - it returns a negative amount. For example -10 000.

I want this increase to be stated as a negative amount. How can I fix this?

thanks!
 
H

help!

That does work but I still want to put a "0" in the cell if the increase is a
- amount..

This did work and put the increase as a positive amount. thank you
 
G

Gaurav

=MAX((C26-C29),(C29-C26),0)

might work.


help! said:
That does work but I still want to put a "0" in the cell if the increase
is a
- amount..

This did work and put the increase as a positive amount. thank you
 
D

David Biddulph

=IF((C29-C26)>=0,C29-C26,0) could be =MAX(C29-C26,0)

=IF((C29-C26)<=0,C29-C26,0) could be =MIN(C29-C26,0)
If you want to reverse the sign, then =-MIN(C29-C26,0) or =MAX(C26-C29,0)
 

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