What is wrong in this formula?

S

Surak

Hi all
Excel tells me that the formula I use has errors. However, it doesn't matter what I change, I can't get it to work. Please help. The formula calculates a correlation between datasets (rows) and flags the reult as good or bad.

=IF (OR (IF (AO>AM, AM/AO, AO/AM) < 0.9, IF(AP>AN, AN/AP, AP/AN) < 0.9), 'Bad', 'Good'

Thank
Surak
 
A

Arvi Laanemets

Hi

Maybe
=IF (OR (IF (AO>AM, AM/AO<0.9, AO/AM<0.9), IF(AP>AN, AN/AP<0.9, AP/AN<0.9)),
'Bad', 'Good')
or
=IF (AND(OR (IF (AO>AM, AM/AO<0.9, AO/AM<0.9),OR(AP>AN, AN/AP<0.9,
AP/AN<0.9)), 'Bad', 'Good')


--
(When sending e-mail, use address [email protected])
Arvi Laanemets


Surak said:
Hi all,
Excel tells me that the formula I use has errors. However, it doesn't
matter what I change, I can't get it to work. Please help. The formula
calculates a correlation between datasets (rows) and flags the reult as good
or bad.:
 
J

J.E. McGimpsey

One way:

=IF(OR((MIN(AM1,AO1)/MAX(AM1,AO1))<0.9,
(MIN(AN1,AP1)/MAX(AN1,AP1))<0.9),"Bad","Good")
 
G

gocush

When nesting IF STATEMENTS, I find it helpful to start in the middle
and build out:

OR(A,B,C)
IF(OR(A,B,C),"BAD","GOODBYE")
OR(X,Y,Z)
IF(OR(X,Y,Z),"GOOD","HELLO")

IF(OR(A,B,C),"BAD",IF(OR(X,Y,Z),"GOOD","YANKEES"))

Also note that EACH IF clause has 3 parts --
1 the conditions which are checked
2. what happens if all conditions are met
3. what happens if all conditions are NOT met
In my last formula, I have nested a second if statement which is now
the 3rd part of the 1st statement.

HTH
 
A

Arvi Laanemets

Sorry! I think I wasn't awake enough .-(

What do you want exactly to do? Are you referring to columns in your formula
purpousely, or you ave left row references out by accident? Maybe something
like this will work:
=IF (OR (IF (AO1>AM1, AM1/AO1, AO1/AM1) < 0.9, IF(AP1>AN1, AN1/AP1, AP1/AN1)
< 0.9)
or
=IF(OR(MIN(AM1,AO1)/MAX(AM1,AO1)<0.9,MIN(AN1,AP1)/MAX(AN1,AP1)<0.9),"Bad","G
ood")
or
=IF(OR(MIN(AM1/AO1,AO1/AM1)<0.9,MIN(AN1/AP1,AP1/AN1)<0.9),"Bad","Good")
When not, then likely at least some data in columns AM:AP are texts.
 
Top