+ Reply to Thread
Results 1 to 4 of 4

VLOOKUP: Prevent other values

  1. #1
    Registered User
    Join Date
    04-08-2014
    Location
    Bloemfontein, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    2

    Question VLOOKUP: Prevent other values

    Hi everybody!

    First of all, I am an extreme novice with Excel. I have searched this forum for similar problems to the one I have, but could not find any. (I'm not even sure what this problem is called or which terms to use to describe it! - Please excuse my ignorance)

    Please see attached screen shot.

    I have this spreadsheet in which the only input of importance is a specific code (as in medical insurance ICD-10 code). For each specific code, an amount is allocated. The codes and amounts are in columns L and M.

    A specific code is then entered in column D.
    For example, if code "108" is entered in column D, the amount appears in column E.

    I am using VLOOKUP to do this. (see code in screenshot)

    Problem is, when entering a code which is NOT in the VLOOKUP range (not a specified code) ... for example 999, it still calculates a value for column E. (screenshot)

    How can I "set a limit" so that only the specified codes, as show in the CODE/AMOUNT range, are accepted?

    Thanks in advance for your help!

    ExcelProb.jpg

    Attachment 310192

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: VLOOKUP: Prevent other values

    Try using FALSE as the 4th argument in the vlookup.

    =VLOOKUP(D2,$L$2:$M$15,2,FALSE)

  3. #3
    Registered User
    Join Date
    04-08-2014
    Location
    Bloemfontein, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: VLOOKUP: Prevent other values

    Hi Jonmo1,

    Works like a charm!!
    Thank you so much!!!

    MUCH MUCH appreciated!

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: VLOOKUP: Prevent other values

    Glad to help, thanks for the feedback.

+ 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] Refresh data from web and prevent VLOOKUP range from changing
    By nobodyukno in forum Excel General
    Replies: 8
    Last Post: 08-17-2013, 04:56 PM
  2. prevent double data on the vlookup function
    By herukuncahyono in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-21-2010, 12:00 AM
  3. Prevent Premature Return of Values
    By Somebodyhadto in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-13-2008, 01:19 AM
  4. [SOLVED] prevent chart values from changing
    By i compute in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-11-2006, 01:50 PM
  5. Prevent #N/A values
    By shikamikamoomoo in forum Excel General
    Replies: 3
    Last Post: 08-17-2005, 05:31 PM

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