Multiple IF Statements

  • Thread starter Thread starter sbremner
  • Start date Start date
S

sbremner

Hi Guys,

Quick question, I want to have an IF Statement that can be used acros
a number of cells. The code I have so far (That works) is:


Code
-------------------

=IF(E11="Error","ERROR Check N/a Boxes",(D57/A57))

-------------------


Basically, I not only want "E11" to be subject to this, but a number o
other cells. I have tried:


Code
-------------------

=IF(E11,E48="Error","ERROR Check N/a Boxes",(D57/A57))

-------------------


But I get errors returned. :confused:

Any ideas?

Thanks

Stev
 
Hi Steve

if i'm understanding you correctly you need to use an OR statement embedded
in the IF

e.g.
=IF(OR(E11="Error",E49="Erorr"),"whatever you want to happen if one of them
has an error", "what ever you want to happen if none of them has an error")

the OR statement says that if any of the arguements test to TRUE then the
TRUE part of the IF statement happens and if none of them evaluate to TRUE
then the FALSE part of the IF statement happens.

alternatively you could use and AND statement
e.g.
=IF(AND(E11="Error",E49="Erorr"),"whatever you want to happen if BOTH of
them has an error", "what ever you want to happen if one or more of them has
an error")

in both the AND and OR statements you can have up to 30 arguments (ie test
for the values in 30 cells)

hope this helps
JulieD
 
Hi

=SUMPRODUCT(ISNA(A57:D57)*1)
counts #N/A errors

=SUMPRODUCT(ISERROR(A57:D57)*1)
counts any errors

What do you want to do, when there are no errors - sum the range? When yes,
then
=IF(SUMPRODUCT(ISNA(A57:D57)*1=0,SUM(A57:D57),"Error")

But unless for need to get informed about errors, I'd prefer to edit the
formulas in range
=IF(ISERROR(YourFormula),"",YourFormula)
and then you can use simply
=SUM(A57:D57)
 
Back
Top