+ Reply to Thread
Results 1 to 5 of 5

HLookup to scan upwards??

  1. #1
    Registered User
    Join Date
    05-24-2013
    Location
    TORONTO, CANADA
    MS-Off Ver
    Excel 2013
    Posts
    4

    HLookup to scan upwards??

    See the attachment.

    according to the grading scale on row1 and row2, give the grade of the scores on the lower column1 and fill it in the column2.....



    I used the hlookup but failed cuz the hlookup scans downwards, but I need it to be scanned upwards..... I put "hlookup" and "dream results" for the comparison....

    who can do a bit help?? other functions are also welcome!

    many thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: HLookup to scan upwards??

    Why not change the threshold values so that they are correct, and then use HLOOKUP in the usual way?

    What is the threshold score for each grade?
    Entia non sunt multiplicanda sine necessitate

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

    Re: HLookup to scan upwards??

    Reverse the sort of the values in A1:I2
    A1 = 9.999999999E+307 (largest number allowed in a cell)
    B1 = 1500
    C1 = 1300
    etc
    A2 = i
    B2 = h
    C2 = g
    etc..

    Then use
    =INDEX($A$2:$I$2,MATCH(A8,$A$1:$I$1,-1))

  4. #4
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: HLookup to scan upwards??

    Change your I1 from >1500 to 1501 then
    in B8 enter =IFERROR(INDEX($A$2:$I$2,IF(MATCH(A8,$A$1:$I$1,1)+1>COUNT($A$1:$I$1),MATCH(A8,$A$1:$I$1,1),MATCH(A8,$A$1:$I$1,1)+1)),"a") and drag it down
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    09-11-2009
    Location
    Paris
    MS-Off Ver
    Excel 2003
    Posts
    102

    Re: HLookup to scan upwards??

    Hi,
    Another way....
    =IF(A8>$H$1,$I$2,INDEX($A$2:$H$2,MATCH(MIN(IF($A$1:$H$1-A8>0,$A$1:$H$1,MAX($A$1:$H$1))),$A$1:$H$1,0)))
    Confirmed with Ctrl+Shift+Enter!
    Attached Files Attached Files

+ 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