+ Reply to Thread
Results 1 to 3 of 3

Multiple vlookup formula won't work if expanded to 4 vlookups

  1. #1
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Multiple vlookup formula won't work if expanded to 4 vlookups

    hi everyone,

    I have the following formula:

    =IF(ISNA(VLOOKUP(A16&"-01",'Data Month 1'!W:W,1,0)),IF(ISNA(VLOOKUP(A16&"-01",'Data Month 2'!W:W,1,0)),IF(ISNA(VLOOKUP(A16&"-01",'Data Month 3'!W:W,1,0)),"",VLOOKUP(A16&"-01",'Data Month 3'!W:W,1,0)),VLOOKUP(A16&"-01",'Data Month 2'!W:W,1,0)),VLOOKUP(A16&"-01",'Data Month 1'!W:W,1,0))

    This formula works just fine. However, when I try to add another worksheet Data Month 4:

    =IF(ISNA(VLOOKUP(A16&"-01",'Data Month 1'!W:W,1,0)),IF(ISNA(VLOOKUP(A16&"-01",'Data Month 2'!W:W,1,0)),IF(ISNA(VLOOKUP(A16&"-01",'Data Month 3'!W:W,1,0)),IF(ISNA(VLOOKUP(A16&"-01",'Data Month 4'!W:W,1,0)),"",VLOOKUP(A16&"-01",'Data Month 3'!W:W,1,0)),VLOOKUP(A16&"-01",'Data Month 2'!W:W,1,0)),VLOOKUP(A16&"-01",'Data Month 1'!W:W,1,0)),IF(ISNA(VLOOKUP(A16&"-01",'Data Month 4'!W:W,1,0))

    I get a message that I'm missing a parenthesis. I've tried a number of combinations but I haven't been able to figure it out. Any ideas?

    thanks!

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Multiple vlookup formula won't work if expanded to 4 vlookups

    You are missing two closing brackets if this helps. Adding two to the end makes the formula accepted (though not necessarily correct).

    An easy way to check is to force the formula to be a string by having a leading apostrophe and using the following formula

    =(LEN(A1)-LEN(SUBSTITUTE(A1,"(","")))-(LEN(A1)-LEN(SUBSTITUTE(A1,")","")))

    A positive answer indicates more opening brackets than closing brackets.
    Martin

  3. #3
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: Multiple vlookup formula won't work if expanded to 4 vlookups

    Nevermind. Figured it out. I'm stupid. Thanks.

+ 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. vlookups wont work as multiple instances, what will?
    By oneblondebrow in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-05-2013, 11:12 AM
  2. Multiple Criteria with VLookups/Indexs - Won't work?
    By zyrakris in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-30-2013, 12:28 AM
  3. Expanded Vlookup Issue
    By melegaunt in forum Excel General
    Replies: 12
    Last Post: 01-27-2009, 12:27 AM
  4. Formula to add multiple vlookups
    By RAH in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-11-2008, 12:46 PM
  5. vlookup function-for expanded payroll
    By cheggie1 in forum Excel General
    Replies: 4
    Last Post: 02-21-2007, 12:00 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