+ Reply to Thread
Results 1 to 6 of 6

VLookup not to closest match

  1. #1
    Registered User
    Join Date
    05-31-2013
    Location
    Houston TX
    MS-Off Ver
    Excel 2016
    Posts
    22

    VLookup not to closest match

    I am doing a vlookup in Excel 2016. If my input value is not in the list, I want to report an error (rather than going to the closest match). How would I do that?
    thanks, Randy

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: VLookup not to closest match

    Here is a generic example
    =VLOOKUP(LOOKUP VALUE,TABLE ARRAY,COLUMN INDEX NUMBER, FALSE) the FALSE will force the VLOOKUP to search for an EXACT match. If an exact match isn't found, a #N/A error is returned.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: VLookup not to closest match

    Not sure what you wrote but this should do it for you... =VLOOKUP(A2,lookup range,#columns over,false)
    Should return #N/A if the value isn't there.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Contributor
    Join Date
    12-23-2003
    Posts
    179

    Re: VLookup not to closest match

    @RandWald

    Change

    VLOOKUP(X,Table,N)

    or

    VLOOKUP(X,Table,N,TRUE)

    or

    VLOOKUP(X,Table,N,1)

    that you might have, to just:

    VLOOKUP(X,Table,N,0)

  5. #5
    Registered User
    Join Date
    03-18-2015
    Location
    uae
    MS-Off Ver
    2013
    Posts
    21

    Re: VLookup not to closest match

    use index match

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

    Re: VLookup not to closest match

    Try this...

    Data Range
    A
    B
    C
    D
    E
    1
    2
    5
    Poor
    17
    #N/A
    3
    10
    Average
    4
    15
    Good
    5
    20
    Excellent
    6
    ------
    ------
    ------
    ------
    ------


    This formula entered in E2:

    =VLOOKUP(D2,A2:B5,2,0)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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] Vlookup with 3 criteria and closest match
    By martinpgibson in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-09-2015, 11:06 PM
  2. Replies: 2
    Last Post: 12-18-2014, 09:52 AM
  3. Vlookup with closest match and exact match
    By hooshies in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-01-2013, 01:13 PM
  4. How to round up to closest match in vlookup
    By Onestopfanshop in forum Excel General
    Replies: 1
    Last Post: 01-04-2011, 02:41 PM
  5. Usage of vlookup with closest match
    By KiPA in forum Excel General
    Replies: 3
    Last Post: 11-30-2010, 06:41 PM
  6. Vlookup Closest Match
    By adam2308 in forum Excel General
    Replies: 4
    Last Post: 06-17-2009, 10:07 AM
  7. VLOOKUP Closest Match Not Close Enough
    By Panic in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2008, 03:41 PM

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