IF, OR, ISERROR?
"Mike H" wrote:
=IF(OR(ISERROR(A1-B1),A1-B1<0),0,A1-B1)
Or:
=IF(ISERRROR(A1-B1),0,MAX(0,A1-B1))
I'm not very familiar with Excel 2007, but I think that construction lends
itself well to the use of IFERROR, to wit:
=IFERROR(MAX(0,A1-B1),0)
----- original message -----
"Mike H" wrote in message
...
Hi,
You didn't get around to telling us what was to happen if neither of these
conditions is TRUE so I guess a1-b1
=IF(OR(ISERROR(A1-B1),A1-B1<0),0,A1-B1)
Mike
"FJ" wrote:
Hi, Im trying to write a formula in column C. Basically, if the result
of
A1-B1 is either a negative number or gives an error message, such as
#VALUE,
I want cell C1 to show 0. I realize this is probably very simple, but I
am
really stumped. :( I've tried many different combinations using IF, OR,
and
ISERROR but so far I haven't had any success. :( Can anyone help?
Thank you in advance for any information.
|