+ Reply to Thread
Results 1 to 6 of 6

Vlookup Returns Strange Result

  1. #1
    Forum Contributor
    Join Date
    01-30-2011
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    102

    Vlookup Returns Strange Result

    I have a very straightforward vlookup formula:

    =IF(AND(VLOOKUP($AB7,EmpInfo!$A$15:$AD$215,5,FALSE)<18,VLOOKUP($AB7,Summary!$A$10:$I$210,9,FALSE)>40)=FALSE,"yes","no")

    that, when evaluated to the last couple of steps looks like:

    if(FALSE=FALSE,"yes","no")
    If(TRUE,'yes","no")

    why does the result come up a zero?

    The cell is not formatted specifically for anything

    Thanks in advance
    Last edited by ZooTV92; 09-04-2011 at 09:28 AM.

  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: Vlookup Returns Strange Result

    =IF(AND(VLOOKUP($AB7,empinfo!$A$15:$AD$215,5,FALSE)<18,VLOOKUP($AB7,summary!$A$10:$I$210,9,FALSE)>40), "yes","no")
    "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 Contributor
    Join Date
    01-30-2011
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    102

    Re: Vlookup Returns Strange Result

    That was actually my original formula.

    Now it comes up #N/A

    How is that possible? The first condition clearly evaluates to TRUE, so the response should be "yes", right?
    Last edited by ZooTV92; 09-04-2011 at 07:33 AM.

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

    Re: Vlookup Returns Strange Result

    if either is na in an and() statement you get na

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Vlookup Returns Strange Result

    Try this version

    =LOOKUP("zzz",IF({1,0},"yes",IF(AND(VLOOKUP($AB7,EmpInfo!$A$15:$AD$215,5,FALSE)<18,VLOOKUP($AB7, Summary!$A$10:$I$210,9,FALSE)>40 ),"no","yes")))

    Then you only get "no" if both conditions are satisfied
    Audere est facere

  6. #6
    Forum Contributor
    Join Date
    01-30-2011
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    102

    Re: Vlookup Returns Strange Result

    Thanks for the input. I will implement.

    Regards.

+ 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