Nested If

  • Thread starter Thread starter ub
  • Start date Start date
U

ub

Hi
I have an if statement with 5 nested if statments , each if statement
satisfy's more than 1 condition, example :
IF(AND(HOUR(D6)<=HOUR(F6),OR(HOUR(D6)<=20,HOUR(D6)>=8),MINUTE(D6)>MINUTE(F6)),
" Target",
IF(AND(HOUR(D6)<=HOUR(F6),OR(HOUR(D6)<=20,HOUR(D6)>=8),MINUTE(D6)<MINUTE(F6)),"Target not met", another if statement and so on)))
But when I add another if condition, system gives me a message that their is
error in formula. I have checked the formula but their is no error. If I take
one of the if condition, it works.
Please advise how many conditions can I specify in a function and if my
conditions are more, then what is the best way to get the results.

Regards
 
ub said:
Hi
I have an if statement with 5 nested if statments , each if statement
satisfy's more than 1 condition, example :
IF(AND(HOUR(D6)<=HOUR(F6),OR(HOUR(D6)<=20,HOUR(D6)>=8),MINUTE(D6)>MINUTE(F6)),
" Target",
IF(AND(HOUR(D6)<=HOUR(F6),OR(HOUR(D6)<=20,HOUR(D6)>=8),MINUTE(D6)<MINUTE(F6)),"Target not met", another if statement and so on)))
But when I add another if condition, system gives me a message that their is
error in formula. I have checked the formula but their is no error. If I take
one of the if condition, it works.
Please advise how many conditions can I specify in a function and if my
conditions are more, then what is the best way to get the results.

Regards
 
Sorry Finger Twitch. I know that in Excel 2003 the max no of conditions in IF
is 7, after that you get an error

Best

Stew
 
ub said:
Hi
I have an if statement with 5 nested if statments , each if statement
satisfy's more than 1 condition, example :
IF(AND(HOUR(D6)<=HOUR(F6),OR(HOUR(D6)<=20,HOUR(D6)>=8),MINUTE(D6)>MINUTE(F6)),
" Target",
IF(AND(HOUR(D6)<=HOUR(F6),OR(HOUR(D6)<=20,HOUR(D6)>=8),MINUTE(D6)<MINUTE(F6)),"Target
not met", another if statement and so on)))
But when I add another if condition, system gives me a message that their
is
error in formula. I have checked the formula but their is no error. If I
take
one of the if condition, it works.
Please advise how many conditions can I specify in a function and if my
conditions are more, then what is the best way to get the results.

depends on excel version. 64 if's cans be nested in Excel 2007. Earlier
version have a lower limit (I think 7)
 
Back
Top