+ Reply to Thread
Results 1 to 5 of 5

Nested IF Statements

  1. #1
    Registered User
    Join Date
    12-19-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    30

    Nested IF Statements

    I have a cell in my workbook with this function:

    Please Login or Register  to view this content.
    I'm trying to nest a few more VLOOKUP's into this IF statement. So, if a date isn't in the above workbooks, to cycle through and look them up in 'Lookup2011,' 'Lookup2010'.

    But I'm having trouble nesting them correctly. Excel throws up 'too many arguments' error.

    Can anyone advise how to look up more workbooks into the function.

    Thank you for your help.

  2. #2
    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
    52,936

    Re: Nested IF Statements

    IFERROR() syntax is....

    =IFERROR( your-formula, what-to-do-if-your-formula-doesnt-work)

    so maybe something like...
    =IFERROR(VLOOKUP(A2,Lookup2013,9,FALSE),IFERROR(VLOOKUP(A2,Lookup2012,9,FALSE)...................................)
    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

  3. #3
    Registered User
    Join Date
    12-19-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Nested IF Statements

    Hi,

    I tried,

    Please Login or Register  to view this content.
    Excel showing a message, saying I've entered too many arguments...

    I need the Lookup to cycle through (at least 5 workbooks) until a match is found (if no match is found then leave the cell blank).

  4. #4
    Forum Contributor
    Join Date
    05-24-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    291

    Re: Nested IF Statements

    not sure see if this works

    =IFERROR(VLOOKUP(A2,Lookup2013,9,0),IFERROR(VLOOKUP(A2,Lookup2012,9,0),IFERROR(VLOOKUP(A2,Lookup2011,9,0),IFERROR(VLOOKUP(A2,Lookup2010,9,0),IFERROR(VLOOKUP(A2,Lookup2009,9,0),IFERROR(VLOOKUP(A2,Lookup2008,9,0),""))))))
    Click on * below if you find this helpful

    Thanks,
    A

  5. #5
    Registered User
    Join Date
    12-19-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Nested IF Statements

    Exactly what I was looking for. Thank you for your help.

+ 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. questions with if statements and nested if statements
    By Pat Excel in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-03-2013, 01:41 PM
  2. Nested if statements with AND and OR statements
    By joeljoel in forum Excel General
    Replies: 4
    Last Post: 08-08-2011, 12:57 PM
  3. Multiple nested IF statements and AND statements
    By TonyGetz in forum Excel General
    Replies: 2
    Last Post: 12-14-2010, 03:07 AM
  4. Nested If statements / logic statements
    By Brainless_09 in forum Excel General
    Replies: 3
    Last Post: 06-17-2009, 02:59 PM
  5. Replies: 12
    Last Post: 05-15-2009, 08:38 AM

Tags for this Thread

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