Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF, OR, ISERROR?
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. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF, OR, ISERROR?
=IF(ISERROR(A1-B1),0,MAX(0,A1-B1)) assuming that you might want it to show
A1-B1 in the cases for which you haven't specified an output. or =IF(ISERROR(A1-B1),0,IF(A1-B1<0,0,"whatever answer you want in this case")) -- David Biddulph FJ wrote: Hi, I'm 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. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF, OR, ISERROR?
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. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF, OR, ISERROR?
Hi, Mike, thank you so much for your quick reply. :) Your formula worked
great and yes, you were right that if neither condition were true I wanted A1-B1. :) Thanks again! :) "Mike H" wrote: 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. |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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. |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF, OR, ISERROR?
I wrote:
=IF(ISERRROR(A1-B1),0,MAX(0,A1-B1)) Oops! I didn't notice that David had already posted the same suggestion. ----- original message ----- "Joe User" <joeu2004 wrote in message ... "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. |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF, OR, ISERROR?
Hi, Joe, sorry to respond so late. I haven't had a chance to check here in a
while. Thanks for your formulas. They worked great. :) "Joe User" wrote: "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. . |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
IF, OR, ISERROR?
Hi, David, sorry to respond so late. I haven't had a chance to check here in
a while. Thanks for your formulas. They worked great. :) "David Biddulph" wrote: =IF(ISERROR(A1-B1),0,MAX(0,A1-B1)) assuming that you might want it to show A1-B1 in the cases for which you haven't specified an output. or =IF(ISERROR(A1-B1),0,IF(A1-B1<0,0,"whatever answer you want in this case")) -- David Biddulph FJ wrote: Hi, I'm 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. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
iserror | Excel Worksheet Functions | |||
Iserror help | Excel Discussion (Misc queries) | |||
Help with ISERROR | Excel Worksheet Functions | |||
use of ISERROR | Excel Worksheet Functions | |||
iserror | Excel Discussion (Misc queries) |