+ Reply to Thread
Results 1 to 5 of 5

IF statement with 2 VLOOKUPS

  1. #1
    Forum Contributor
    Join Date
    02-14-2008
    Location
    Manchester, England
    MS-Off Ver
    2007
    Posts
    110

    IF statement with 2 VLOOKUPS

    Hello

    Can anyone see why this isn't working?

    =IF(K6="",VLOOKUP(M6,Sheet2!B:C,2,FALSE),VLOOKUP(Sheet1!K6,Sheet2!B:C,2,FALSE))

    I am wanting to look if K6 is blank. If it is I want to do a lookup against M6. If it's not blank I want the lookup from K6.

    Regards

  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: IF statement with 2 VLOOKUPS

    nothing intrinsically wrong there what results do you get?
    "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
    Registered User
    Join Date
    06-27-2013
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: IF statement with 2 VLOOKUPS

    did you want it to look off of sheet2 for the m6? or sheet1?

  4. #4
    Forum Contributor
    Join Date
    02-14-2008
    Location
    Manchester, England
    MS-Off Ver
    2007
    Posts
    110

    Re: IF statement with 2 VLOOKUPS

    Sheet1 for both.

    I'm getting too many arguments message but I can't see anything wrong either.

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

    Re: IF statement with 2 VLOOKUPS

    works fine see attached clear k6 to test
    Attached Files Attached Files

+ 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. [SOLVED] is it possible to contain 36 vlookups and an IF statement in a single cell?
    By jaggeh in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-03-2013, 12:48 PM
  2. IF Statement to return Vlookups vased off cell
    By kmarks247 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-19-2013, 04:45 PM
  3. IF statement with 3 VLOOKUPs
    By Gijs in forum Excel General
    Replies: 4
    Last Post: 05-29-2012, 05:53 AM
  4. Nested If statement with Vlookups
    By wallander in forum Excel General
    Replies: 2
    Last Post: 08-16-2011, 12:32 PM
  5. vlookups
    By Rob in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2005, 11:06 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