+ Reply to Thread
Results 1 to 7 of 7

nested if statement using different tab vlookups

  1. #1
    Registered User
    Join Date
    09-16-2014
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    6

    nested if statement using different tab vlookups

    Hello All,
    I'm trying to do a nested if statement that uses the vlookup function to different tabs.
    =IF($L:$L=VLOOKUP($L:$L,MISSY!$F:$F,1,FALSE),"x",IF($L:$L=VLOOKUP($L:$L,WOMEN!$F:$F,1,FALSE),"x",IF($L:$L=VLOOKUP($L:$L,PETITE!$F:$F,1,FALSE),"X","")))

    Only the 1st portion of the if statement works:
    =IF($L:$L=VLOOKUP($L:$L,MISSY!$F:$F,1,FALSE),"x"

    But when it doesn't find the criteria of the 1st portion of the equation it just gives me n/a#'s. Why won't it continue to the next step of the equation and so on?

    Thanks in advance for your help.

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

    Re: nested if statement using different tab vlookups

    you cant(well you can but its not right) use whole column,or ranges in if or as the lookup value
    consider
    =IF(L:L=1,"x","y") that will work but it only looks at the row the formula is in
    so if its in row 1 it looks at l1
    if its in row 100 it looks at l100
    "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

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: nested if statement using different tab vlookups

    Typically, you'd use a single cell as the reference like this:

    =IF(L1=VLOOKUP(L1,.....

    However, looking at your formula I'm guessing there's a better way to do what you want.

    Can you explain what you want the formula to do?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    09-16-2014
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: nested if statement using different tab vlookups

    Guys thanks for getting back to me.
    I ultimately want the formula to look up text in column L on my Missy tab, or my Women's tab or my Petite tab and if it finds that text in one of those tabs put an "x".
    I hope that is clear.
    Thanks for your help.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: nested if statement using different tab vlookups

    OK, you have to test each cell in column L individually.

    Assuming your first cell is L2, try this:

    =IF(COUNT(MATCH(L2,MISSY!F:F,0),MATCH(L2,WOMEN!F:F,0),MATCH(L2,PETITE!F:F,0)),"X","")

    Copy down as needed.

  6. #6
    Registered User
    Join Date
    09-16-2014
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: nested if statement using different tab vlookups

    Tony,
    Thank you so much that worked! Now I just have to figure out how you knew to put those two functions together .

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: nested if statement using different tab vlookups

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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. Nested If and Vlookups
    By lorber123 in forum Excel General
    Replies: 4
    Last Post: 05-18-2014, 12:48 PM
  2. Nested Vlookups?
    By tenscourts in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-19-2012, 06:03 AM
  3. Nested If statement with Vlookups
    By wallander in forum Excel General
    Replies: 2
    Last Post: 08-16-2011, 12:32 PM
  4. Nested IFs and VLOOKUPs
    By Johny1 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-26-2009, 07:11 AM
  5. Nested Vlookups
    By TarekHamouda in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-12-2006, 02:45 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