Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
John
 
Posts: n/a
Default Max IF Statement Q

Could anyone tell me if I have exceeded the allowed number of IF statements
in the formula below?

It seems to stop working correctly at the second formula below - is there a
work around?

=IF(Masters!K1="London",(IF(AND(AA10<18),'JLC
Rates'!D$14,(IF(AND(AA12<1,AA10=18),'JLC
Rates'!D$10,(IF(AND(AA121,AA10<19,AA10=18),'JLC
Rates'!D$10,IF(AND(AA121,AA10=19),'JLC
Rates'!D$12,""))))))),(IF(AND(AA10<18),'JLC
Rates'!G$14,(IF(AND(AA12<1,L10=18),'JLC
Rates'!G$10,(IF(AND(AA121,AA10<19,AA10=18),'JLC
Rates'!G$10,IF(AND(AA121,AA10=19),'JLC Rates'!G$12,""))))))))

Part of above

(IF(AND(AA10<18),'JLC Rates'!G$14,(IF(AND(AA12<1,L10=18),'JLC
Rates'!G$10,(IF(AND(AA121,AA10<19,AA10=18),'JLC
Rates'!G$10,IF(AND(AA121,AA10=19),'JLC Rates'!G$12,""))))))))


  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

You can have 7 nested IFs, you have 8, you have exceeded the max. You might
get away with making the last IF in each K1 case a default, but here is
another suggestion

=INDIRECT(IF(Masters!K1="London","'JLC Rates'!D$","'JLC
Rates'!G$")&(IF(AA10<18,14,(IF(AND(AA12<1,AA10=18 ),10,(IF(AND(AA121,AA10<1
9,AA10=18),10,IF(AND(AA121,AA10=19),12,"")))))) ))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"John" wrote in message
...
Could anyone tell me if I have exceeded the allowed number of IF

statements
in the formula below?

It seems to stop working correctly at the second formula below - is there

a
work around?

=IF(Masters!K1="London",(IF(AND(AA10<18),'JLC
Rates'!D$14,(IF(AND(AA12<1,AA10=18),'JLC
Rates'!D$10,(IF(AND(AA121,AA10<19,AA10=18),'JLC
Rates'!D$10,IF(AND(AA121,AA10=19),'JLC
Rates'!D$12,""))))))),(IF(AND(AA10<18),'JLC
Rates'!G$14,(IF(AND(AA12<1,L10=18),'JLC
Rates'!G$10,(IF(AND(AA121,AA10<19,AA10=18),'JLC
Rates'!G$10,IF(AND(AA121,AA10=19),'JLC Rates'!G$12,""))))))))

Part of above

(IF(AND(AA10<18),'JLC Rates'!G$14,(IF(AND(AA12<1,L10=18),'JLC
Rates'!G$10,(IF(AND(AA121,AA10<19,AA10=18),'JLC
Rates'!G$10,IF(AND(AA121,AA10=19),'JLC Rates'!G$12,""))))))))




  #3   Report Post  
John
 
Posts: n/a
Default

Thanks Bob

"Bob Phillips" wrote in message
...
You can have 7 nested IFs, you have 8, you have exceeded the max. You

might
get away with making the last IF in each K1 case a default, but here is
another suggestion

=INDIRECT(IF(Masters!K1="London","'JLC Rates'!D$","'JLC

Rates'!G$")&(IF(AA10<18,14,(IF(AND(AA12<1,AA10=18 ),10,(IF(AND(AA121,AA10<1
9,AA10=18),10,IF(AND(AA121,AA10=19),12,"")))))) ))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"John" wrote in message
...
Could anyone tell me if I have exceeded the allowed number of IF

statements
in the formula below?

It seems to stop working correctly at the second formula below - is

there
a
work around?

=IF(Masters!K1="London",(IF(AND(AA10<18),'JLC
Rates'!D$14,(IF(AND(AA12<1,AA10=18),'JLC
Rates'!D$10,(IF(AND(AA121,AA10<19,AA10=18),'JLC
Rates'!D$10,IF(AND(AA121,AA10=19),'JLC
Rates'!D$12,""))))))),(IF(AND(AA10<18),'JLC
Rates'!G$14,(IF(AND(AA12<1,L10=18),'JLC
Rates'!G$10,(IF(AND(AA121,AA10<19,AA10=18),'JLC
Rates'!G$10,IF(AND(AA121,AA10=19),'JLC Rates'!G$12,""))))))))

Part of above

(IF(AND(AA10<18),'JLC Rates'!G$14,(IF(AND(AA12<1,L10=18),'JLC
Rates'!G$10,(IF(AND(AA121,AA10<19,AA10=18),'JLC
Rates'!G$10,IF(AND(AA121,AA10=19),'JLC Rates'!G$12,""))))))))






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


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF Statement with Average Function results in #Value! Paul Excel Discussion (Misc queries) 5 December 28th 04 08:11 AM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM
Statement lintan Excel Worksheet Functions 1 December 2nd 04 11:31 PM
Duplicate fields does not match up! If statement Patsy Excel Worksheet Functions 0 November 11th 04 12:16 AM
If statement needed Patsy Excel Worksheet Functions 1 November 4th 04 03:48 PM


All times are GMT +1. The time now is 04:34 AM.

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"