+ Reply to Thread
Results 1 to 5 of 5

Getting an offset value through LOOKUP

  1. #1
    Registered User
    Join Date
    10-04-2008
    Location
    Laval, Qc CANADA
    Posts
    34

    Question Getting an offset value through LOOKUP

    Hello there,

    I need to use a value in an array (which is easy to get with VLOOKUP), but in another cell, I need to use the next value in the same column...

    I tried combining OFFSET with VLOOKUP, but there does not seem to be a way. I could not get the address either, which I think could be another way of attacking the problem.

    For example:

    ARRAY is
    10.038 0.038
    10.054 0.054
    10.066 0.066

    Please Login or Register  to view this content.
    Allows me to get to the value 0.038.
    However, in another cell, I need to get the next value in the same column, (0.054), (But I cannot use LOOKUP alone for this one since the increments in the reference column are not constant)

    Any suggestion on how to achieve that?

    Thanks!

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Getting an offset value through LOOKUP

    assuming you want to match in col a then return say from column d
    index(a1:d10,match(10.4,a1:a10,0)+1,4)
    match(10.4,a1:a10,0) returns row so just add 1
    Last edited by martindwilson; 11-02-2009 at 05:34 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Getting an offset value through LOOKUP

    Next to that cell write:

    =INDEX(B2:B20,MATCH(C2,B2:B20,0)+1)

    Where B is your second column of array, and C2 vlaue that VLOOKUP return

  4. #4
    Registered User
    Join Date
    10-04-2008
    Location
    Laval, Qc CANADA
    Posts
    34

    Re: Getting an offset value through LOOKUP

    The trouble is, that C2 value could repeat itself in the second column. (Obviously, it is not the case in the reference column for the first VLOOKUP!)

    So any other way?

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Getting an offset value through LOOKUP

    i think you now need to post a workbook
    the index /match given will always return the next row down as you asked from first matched value

+ 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