+ Reply to Thread
Results 1 to 4 of 4

VLOOKUP - varying the LOOKUP

  1. #1
    Registered User
    Join Date
    01-19-2006
    Posts
    15

    VLOOKUP - varying the LOOKUP

    I have a list of information that I wish to perform a lookup function on. The issue is that the lookup values don't correlate to the data values; I need to return the values that are below and above the lookup value.

    for example, if the lookup value is 24 and the data range runs 4,8,31,69; is it possible to perfom a lookup that returns the data for the 8 and the 31?

    Thanks in advance

    AS

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by adscrim
    I have a list of information that I wish to perform a lookup function on. The issue is that the lookup values don't correlate to the data values; I need to return the values that are below and above the lookup value.

    for example, if the lookup value is 24 and the data range runs 4,8,31,69; is it possible to perfom a lookup that returns the data for the 8 and the 31?

    Thanks in advance

    AS
    Hi,

    with a ,True lookup you would normally return the 8.

    If you lookup ,1,True it will return the 8 which you can then use in a Match to determine the row number, and use this +1 to select the next row via an Offset command.

    hth
    ---
    Si fractum non sit, noli id reficere.

  3. #3
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    Hi, its not clear what your really after can you supply a sample worksheet?

    VLookUp has the capability of returning a closest match, i put this together in cell D1
    =IF(ISNA(VLOOKUP(C1,A1:A44,1,TRUE)),"",(VLOOKUP(C1,A1:A44,1,TRUE)))
    in column A i had values 2,4,6 etc in C1 i entered a number lets say 23, the value returned is 22 which is the next nearest without exceeding the look up number, the reason that it does this is because the VLookUp formula has TRUE as the range lookup instead of FALSE which will only return an exact match.

    Hope this helps!

    Regards,
    SImon

  4. #4
    Registered User
    Join Date
    01-19-2006
    Posts
    15
    Thank you both, help from both of you has been utilised and is much appreciated.

    AS

+ 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