#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DP7 DP7 is offline
external usenet poster
 
Posts: 54
Default Formula HELp

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Formula HELp

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"