+ Reply to Thread
Results 1 to 7 of 7

maximum levels of nesting if

  1. #1
    Registered User
    Join Date
    10-24-2011
    Location
    UAE
    MS-Off Ver
    Excel 2007
    Posts
    7

    maximum levels of nesting if

    Hi,

    I am receiving the below message while trying a formula.

    "The specified formula cannot be entered because it uses more levels of nesting than are allowed in the current file format."

    Formula is:

    =IF(OR(C9=C8,C9=C7),0,IF(B9=1,MAFRAQ!K$68,IF(B9=2,MAFRAQ!L$68,IF(B9=3,MAFRAQ!M$68, IF(B9=4,MAFRAQ!N$68, IF(B9=5,MAFRAQ!O$68, IF(B9=6,MAFRAQ!P$68, IF(B9=7,MAFRAQ!Q$68, IF(B9=8,MAFRAQ!R$68, IF(B9=9,MAFRAQ!S$68, IF(B9=10,MAFRAQ!T$68, IF(B9=11,MAFRAQ!U$68, IF(B9=12,MAFRAQ!V$68, IF(B9=13,MAFRAQ!W$68, IF(B9=14,MAFRAQ!X$68, IF(B9=15,MAFRAQ!Y$68, IF(B9=16,MAFRAQ!Z$68, IF(B9=17,MAFRAQ!AA$68, IF(B9=18,MAFRAQ!AB$68, IF(B9=19,MAFRAQ!AC$68, IF(B9=20,MAFRAQ!AD$68, IF(B9=21,MAFRAQ!AE$68, IF(B9=22,MAFRAQ!AF$68, IF(B9=23,MAFRAQ!AG$68, IF(B9=24,MAFRAQ!AH$68, IF(B9=25,MAFRAQ!AI$68, IF(B9=26,MAFRAQ!AJ$68, IF(B9=27,MAFRAQ!AK$68, IF(B9=28,MAFRAQ!AL$68, IF(B9=29,MAFRAQ!AM$68, IF(B9=30,MAFRAQ!AN$68, IF(B9=31,MAFRAQ!AO$68,0))))))))))))))))))))))))))))))))

    Please help.

    Regards,

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,053

    Re: maximum levels of nesting if

    Here, try this:

    =IF(COUNTIF(C7:C8, C9)>0, 0, OFFSET(MAFRAQ!$J$68, 0, B9))
    Last edited by zbor; 10-24-2011 at 03:10 AM. Reason: Sheet: MAFRAQ!
    Never use Merged Cells in Excel

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,053

    Re: maximum levels of nesting if

    But I didn't give you answer...

    In Excel 2007 (as your profile say), a formula can contain up to 64 levels of nesting, but in earlier versions of Excel, the maximum levels of nesting is only 7.

    So it should be fine... But.. If you using more than 5 IF's... You are probably on the wrong way, and you need some other approach.

    Some formulas have more levels of nesting than are supported by the selected file format. Formulas with more than seven levels of nesting will not be saved and will be converted to #VALUE! errors

    In the Compatibility Checker, click Find to locate the cells that contain formulas with more than 7 levels of nesting, and then make the necessary changes to avoid #VALUE! errors.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: maximum levels of nesting if

    or try this one
    =IF(OR(C9=C8,C9=C7),0,INDEX(mafraq!K68:AN68,B9))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,053

    Re: maximum levels of nesting if

    Yes, INDEX approach is better.

  6. #6
    Registered User
    Join Date
    10-24-2011
    Location
    UAE
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: maximum levels of nesting if

    Thanks Martindwilson and zbor,

    It worked.

    =IF(OR(C9=C8,C9=C7),0,INDEX(mafraq!K68:AN68,B9))

    Best Regards,

  7. #7
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: maximum levels of nesting if

    If your problem has been solved then please mark your thread as such.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1