+ Reply to Thread
Results 1 to 5 of 5

IF statement nesting levels

Hybrid View

  1. #1
    Registered User
    Join Date
    12-17-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    46

    IF statement nesting levels

    =IF(ISNA(VLOOKUP(Master!A2,RockSlopes!$AE$4:$AI$253,4,FALSE)),IF(ISNA(VLOOKUP(Master!A2,'2ndEastMains'!$AE$4:$AK$250,4,FALSE)),IF(ISNA(VLOOKUP(Master!A2,'1stEastMains'!$AE$4:$AK$250,4,FALSE)),IF(ISNA(VLOOKUP(Master!A2,'1stSouthMains'!$AE$4:$AK$250,4,FALSE)),IF(ISNA(VLOOKUP(Master!A2,SouthBreakout!$AE$4:$AK$250,4,FALSE)),IF(ISNA(VLOOKUP(Master!A2,WestBreakout!$AE$4:$AK$250,4,FALSE)),IF(ISNA(VLOOKUP(Master!A2,Sump!$AE$4:$AI$250,4,FALSE)),"",VLOOKUP(Master!A2,Sump!$AE$4:$AI$250,4,FALSE)),VLOOKUP(Master!A2,WestBreakout!$AE$4:$AK$250,4,FALSE)),VLOOKUP(Master!A2,SouthBreakout!$AE$4:$AK$250,4,FALSE)),VLOOKUP(Master!A2,'1stSouthMains'!$AE$4:$AK$250,4,FALSE)),VLOOKUP(Master!A2,'1stEastMains'!$AE$4:$AK$250,4,FALSE)),VLOOKUP(Master!A2,'2ndEastMains'!$AE$4:$AK$250,4,FALSE)),VLOOKUP(Master!A2,RockSlopes!$AE$4:$AI$253,4,FALSE))


    My main problem is the nesting levels of my statement; I keep getting a compatibility error when I save my file due to the above function. It actually only has 7 levels, unless I am way off on how the nesting works.

    Is there another option or formula that will serve the same purpose?
    I have tried to replace some of it with a range of sheets but must be doing something wrong.

    I need a formula re-write or something!

    Also, this has been entered as an array in my sheet.


    Thanks
    rod642

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: IF statement nesting levels

    HI rod642,


    We can use a data table layout to refer the If logics using some look funtion... can you upload a sample workbook and the clear description of your logic? thanks.

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: IF statement nesting levels

    Your profile says 2007, which does not have the 7-level restriction...and that restriction would not even let you enter, if it was a factor.\


    Also, I dont see why it needs to be array-entered?

    Are you trying to save as 2003 (.xls)?

    Because you are using 2007, you can simplify that formula to this...

    =IFerrorA(VLOOKUP(Master!A2,RockSlopes!$AE$4:$AI$253,4,FALSE),
    IFerror(VLOOKUP(Master!A2,'2ndEastMains'!$AE$4:$AK$250,4,FALSE),
    IFerror(VLOOKUP(Master!A2,'1stEastMains'!$AE$4:$AK$250,4,FALSE),
    Iferror(VLOOKUP(Master!A2,'1stSouthMains'!$AE$4:$AK$250,4,FALSE),
    IFerror(VLOOKUP(Master!A2,SouthBreakout!$AE$4:$AK$250,4,FALSE),
    IFerror(VLOOKUP(Master!A2,WestBreakout!$AE$4:$AK$250,4,FALSE),
    IFerror(VLOOKUP(Master!A2,Sump!$AE$4:$AI$250,4,FALSE),"")
    (I think I got the () and , right)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    12-17-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: IF statement nesting levels

    Everything seems to be working satisfactory right now. Thanks for all the help. I would like to know what I have to do to have the worksheet names in a range, and if that will simplify things for me. I read on another post at some time that it is possible, but can't seem to get anything to work. At this point, I have several workbooks and up to 7 worksheets in each to accomplish my task. I would like to get back down to 1 workbook.

  5. #5
    Registered User
    Join Date
    12-17-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: IF statement nesting levels

    Everything has been working fine and at a satisfactory level. Excuse the long delay in letting anyone know, was testing and using what I have to be sure it will work efficiently.

+ 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