+ Reply to Thread
Results 1 to 5 of 5

Trouble using the vlookup function

  1. #1
    Registered User
    Join Date
    01-29-2019
    Location
    Pittsburgh
    MS-Off Ver
    2018
    Posts
    1

    Trouble using the vlookup function

    'm having trouble using the vlookup function, I have calculated a final numerical grade for a hypothetical course, and and trying to use a set of numerical grades with their corresponding letter grades to get a vlookup function to return the letter grade from the numerical grade.
    Screen Shot 2019-01-29 at 6.16.48 PM.png
    However the function for some reason only returns the lowest value out of the set grades, not the closest match.
    Screen Shot 2019-01-29 at 6.45.25 PM.png

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,862

    Re: Trouble using the vlookup function

    I think that you need to reverse the order of the values in columns J:K. So a failing grade of 59 would be at the top and 100 at the bottom of your list.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Trouble using the vlookup function

    If you use TRUE as the 4th parameter in VLOOKUP, the data has to be sorted in ascending order - yours is sorted, but in descending order.

    You can sort the data in J3:K23 so that it is in ascending order, and your VLOOKUP formula will work, or you could leave the lookup table as it is and use INDEX/MATCH instead, like this:

    =INDEX(J$3:J$23,MATCH(C29,K$3:K$23,-1))

    Hope this helps.

    Pete

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Trouble using the vlookup function

    Thanks for the rep - I presume one of the methods worked for you.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Pete

  5. #5
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Trouble using the vlookup function

    Try with
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Ensure press SHIFT+CTRL+ENTER


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

+ 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] Trouble with VLOOKUP
    By ramridd in forum Excel General
    Replies: 5
    Last Post: 12-28-2018, 10:18 AM
  2. [SOLVED] im having trouble getting VLOOKUP to do this
    By MRChampion in forum Excel General
    Replies: 5
    Last Post: 11-18-2015, 04:10 AM
  3. Replies: 1
    Last Post: 06-10-2015, 12:56 PM
  4. Trouble with Vlookup
    By djarcadian in forum Excel General
    Replies: 15
    Last Post: 11-14-2014, 11:42 PM
  5. [SOLVED] vlookup trouble
    By bcoffee in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-08-2012, 06:00 PM
  6. Trouble with vlookup
    By bballdcm2007 in forum Excel General
    Replies: 2
    Last Post: 05-11-2011, 07:43 PM
  7. [SOLVED] Trouble with vLookup
    By lcks via OfficeKB.com in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-07-2006, 04:30 AM

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