+ Reply to Thread
Results 1 to 4 of 4

Nested IF Statements. Move levels of nesting than allowed.

  1. #1
    Registered User
    Join Date
    10-17-2015
    Location
    Philippines
    MS-Off Ver
    2010
    Posts
    5

    Nested IF Statements. Move levels of nesting than allowed.

    The formula below is supposed to return the perfomance rates of my employees. I have read that you're allowed up to 64 levels of nested functions, so why am I getting the error message of more levels of nesting than allowed? If I cannot nest IF statements in this way, is there another way to do this? I have 9 different order types that could be a variable for the value of my B column, I have found that if I only had 8, the formula works perfectly. As soon as I add in the 9th variable, the formula breaks.

    =IF(B2=Orders!$A$1,D2/45,IF(B2=Orders!$A$2,D2/10,IF(B2=Orders!$A$3,D2/45,IF(B2=Orders!$A$4,D2/20,IF(B2=Orders!$A$5,D2/100,IF(B2=Orders!$A$6,D2/30,IF(B2=Orders!$A$7,D2/50,IF(B2=Orders!$A$8,D2/50,IF(B2=Orders!$A$9,D2/40,"")))))))))

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Nested IF Statements. Move levels of nesting than allowed.

    Perhaps the file you are working on is an .xls file (i.e. compatible with XL2003 and earlier) rather than an .xlsx file. You can save the file as an Excel workbook (i.e. with an .xlsx extension), then close the file and then re-open it, and you should have no problems with nesting to 9 levels.

    Another way of doing it would be to set up a small table, say in columns X and Y, where X1 would contain the formula:

    =Orders!$A1

    which can be copied down to X9, and Y1 to Y9 would contain the divisors in your formula, i.e. 45, 10, 45, 20, 100, 30, 50, 50, 40

    Then you can just have this formula:

    =IF(COUNTIF($X$1:$X$9,B2),D2/VLOOKUP(B2,$X$1:$Y$9,2,0),"")

    and this will be compatible with both versions of the file.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    10-17-2015
    Location
    Philippines
    MS-Off Ver
    2010
    Posts
    5

    Re: Nested IF Statements. Move levels of nesting than allowed.

    Thanks Pete! You've been a huge help.

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Nested IF Statements. Move levels of nesting than allowed.

    This might work for you.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. More levels of nesting than allowed
    By Gappy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-23-2015, 04:17 PM
  2. ...more levels of nesting than are allowed in teh current file format
    By DExceler in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-25-2014, 12:54 PM
  3. Nested IFs and error message "uses more levels of nesting than allowed"
    By pannassi in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-09-2012, 11:48 AM
  4. Replies: 4
    Last Post: 08-05-2012, 04:21 PM
  5. Formula Uses More Levels Of Nesting Than Are Allowed In Current File Format
    By tronix_Country in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-16-2012, 07:39 PM
  6. Replies: 3
    Last Post: 07-19-2007, 08:28 PM
  7. [SOLVED] How many levels of an IF statement is allowed within a Nested IF?
    By Rick in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-28-2006, 11:10 AM

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