+ Reply to Thread
Results 1 to 7 of 7

Simple VLOOKUP not bringing back correct results

  1. #1
    Registered User
    Join Date
    04-02-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    3

    Simple VLOOKUP not bringing back correct results

    I created a simple VLOOKUP function that gives results based on the value chosen from a list. It works for most products in the list, but some return an incorrect value. Can someone please take a look at it and provide feedback?

    =VLOOKUP(F10,C3:D20,2)


    I've included the excel file and a screenshot of results as attachments.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: Simple VLOOKUP not bringing back correct results

    Hi, try
    =VLOOKUP(F10,C3:D20,2,0)

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

    Re: Simple VLOOKUP not bringing back correct results

    correct vlookup syntax is to add true or false not 0 or 1
    =VLOOKUP(F10,C3:D20,2,false) will look for an exact match
    from vlookup help

    Range_lookup is a logical value that specifies whether you want VLOOKUP to find an exact match or an approximate match. If TRUE or omitted, an approximate match is returned. In other words, if an exact match is not found, the next largest value that is less than lookup_value is returned. If FALSE, VLOOKUP will find an exact match. If one is not found, the error value #N/A is returned.
    "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

  4. #4
    Valued Forum Contributor
    Join Date
    10-06-2008
    Location
    Norway
    MS-Off Ver
    2010
    Posts
    365

    Re: Simple VLOOKUP not bringing back correct results

    Ok, thanks for the correction. I thought it didn't matter if one uses 0 or FALSE.

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Simple VLOOKUP not bringing back correct results

    I don't think it does.

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

    Re: Simple VLOOKUP not bringing back correct results

    it doesn't but its what the help file shows!
    so imo for a new user its best to follow that.
    because the next question should be
    "why 0?,i cant see that explained anywhere"
    then you would have to explain that in excel 0 can =false and 1= true

  7. #7
    Registered User
    Join Date
    04-02-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Simple VLOOKUP not bringing back correct results

    Adding False to the statement corrected my issue. Thanks for the responses.

+ 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