+ Reply to Thread
Results 1 to 9 of 9

Error in Vlookup function

  1. #1
    Registered User
    Join Date
    01-06-2013
    Location
    India
    MS-Off Ver
    Excel 2003,2007
    Posts
    31

    Error in Vlookup function

    Dear all,

    Please find the attachment in which i have mentioned all the details about the error in VLOOKUP function. I couldn't understand why I am getting that error for that single Vlookup value while others are ok.


    Thanks in advance !!!Vlookup error.xlsm

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Error in Vlookup function

    your missing the last criteria
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    this should work

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    01-06-2013
    Location
    India
    MS-Off Ver
    Excel 2003,2007
    Posts
    31

    Re: Error in Vlookup function

    Thanks Humdingaling.............

    I got the point,but with the same criteria( except the optional one) I'm getting the values for the others (Bikhs,Jenefer,selena,Xoxom) while for the last one (Andy) there is an error. I couldn't understand for which reason the error is occurring. Do you have any idea about this ?

  4. #4
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: Error in Vlookup function

    Changing the last parameter to False or 0 made the function work for me, even for Andy.

    To answer your question. From Help (below). Since you omitted it looks at the first value Bikhs is >Andy so it returns an error.

    If range_lookup is either TRUE or is omitted, the values in the first column of table_array must be placed in ascending sort order; otherwise, VLOOKUP might not return the correct value.
    Last edited by Hawkeye16; 07-28-2014 at 03:42 AM.
    Despite the high cost of living, it remains very popular.

    Don't forget to mark threads SOLVED when you get an answer and rep all the geniouses that helped you today!

  5. #5
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: Error in Vlookup function

    I'm not 100% sure but it could be happening because:
    If range_lookup, the optional criteria, is either TRUE or is omitted, the values in the first column of table_array must be placed in ascending sort order; otherwise, VLOOKUP might not return the correct value. (Copied from MS Excel Help)

    The first four names are in Ascending order, B, J, s, X; but the 5th isn't. It is a good habit to provide the 4th criteria for both VLookUp & HLookUp when looking for an exact match, especially a string.
    HTH!

  6. #6
    Registered User
    Join Date
    01-06-2013
    Location
    India
    MS-Off Ver
    Excel 2003,2007
    Posts
    31

    Re: Error in Vlookup function

    yes, that's working .....but without that parameter, the result for all are correct except for Andy.....

  7. #7
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Error in Vlookup function

    your table is not sorted in ascending order

    http://www.techonthenet.com/excel/formulas/vlookup.php

    B>J>S>X are in order

    if you mix them up it will either give you the wrong answer or N/A
    wrong answer if there is something "similar"
    N/a if nothing is similar

  8. #8
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Error in Vlookup function

    For Example
    if you sort by EMP ID
    only Selena and Xoxom will get you the right answer

    because J is before S so jennefer does not work
    and both Bikhs and Andy come before Xoxom

  9. #9
    Registered User
    Join Date
    01-06-2013
    Location
    India
    MS-Off Ver
    Excel 2003,2007
    Posts
    31

    Re: Error in Vlookup function

    Thank you all.....

    Yes, Jewelsharma.....you r correct, for that reason only...Now i got it......

+ 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] Getting error in Vlookup function
    By BRout in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 07-28-2014, 03:09 AM
  2. [SOLVED] Error in IF-VLOOKUP function
    By Fantastic in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-12-2013, 10:55 AM
  3. [SOLVED] Vlookup function gives me #REF error
    By GeoFoxy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-15-2013, 02:14 PM
  4. Vlookup function gives error
    By Shadmani in forum Excel General
    Replies: 2
    Last Post: 03-18-2011, 03:57 AM
  5. VLOOKUP function #REF error
    By hokeyplyr48 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-01-2008, 12:51 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