Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Why does the below formula not work? Any help would be greatly appreciated.
Thanks =IF(AND(AN10="AIR",AX10="Fri"),AH10+3,IF(AND(AN10= "AIR",AX10="Sat"),AH10+2,IF(AND(AN10="AIR",OR(AX10 ="Mon",AX10="Tue",AX10="Wed",AX10="Thu",AX10="Sun" )),AH10+1,IF(AX10="Mon",AH10+4,IF(AX10="Tue",AH10+ 6,IF(AX10="thu",AH10+5,IF(AX10="fri",AH10+5,IF(AX1 0="sun",AH10+5,IF(AX10="Will advise",AX10,""))))))))) |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Which version of Excel? If before 2007, I guess your problem is too many
layers of nesting. Try to rearrange to reduce the nesting depth, such as =IF(AN10="AIR",IF(AX10="Fri",AH10+3,IF(AX10="Sat", AH10+2,IF(OR(AX10="Mon",AX10="Tue",AX10="Wed",AX10 ="Thu",AX10="Sun"),AH10+1,""))),IF(AX10="Mon",AH10 +4,IF(AX10="Tue",AH10+6,IF(AX10="thu",AH10+5,IF(AX 10="fri",AH10+5,IF(AX10="sun",AH10+5,IF(AX10="Wil l advise",AX10,""))))))) or go another stage to =IF(AN10="AIR",IF(AX10="Fri",AH10+3,IF(AX10="Sat", AH10+2,IF(OR(AX10="Mon",AX10="Tue",AX10="Wed",AX10 ="Thu",AX10="Sun"),AH10+1,""))),IF(AX10="Mon",AH10 +4,IF(AX10="Tue",AH10+6,IF(OR(AX10="thu",AX10="fri ",AX10="sun"),AH10+5,IF(AX10="Will advise",AX10,""))))) [With either of these, as in your original, it doesn't specifically cover "Wed" or "Sat" if AN10 is not "AIR", so presumably this is intended to return a blank result?] An alternative approach for reducing nesting depth is to use a LOOKUP instead of nested IFs. -- David Biddulph "DP7" wrote in message ... Why does the below formula not work? Any help would be greatly appreciated. Thanks =IF(AND(AN10="AIR",AX10="Fri"),AH10+3,IF(AND(AN10= "AIR",AX10="Sat"),AH10+2,IF(AND(AN10="AIR",OR(AX10 ="Mon",AX10="Tue",AX10="Wed",AX10="Thu",AX10="Sun" )),AH10+1,IF(AX10="Mon",AH10+4,IF(AX10="Tue",AH10+ 6,IF(AX10="thu",AH10+5,IF(AX10="fri",AH10+5,IF(AX1 0="sun",AH10+5,IF(AX10="Will advise",AX10,""))))))))) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|