+ Reply to Thread
Results 1 to 6 of 6

VLOOKUP with OFFSET

  1. #1
    Registered User
    Join Date
    02-24-2015
    Location
    Houston, TX
    MS-Off Ver
    2013 and 2010
    Posts
    26

    VLOOKUP with OFFSET

    All,

    I need your help. I need to do a calculation using dates by week. Specifically, beginning date and end date, i.e. Beg - 1/12/14 end 1/18/14 - Week 1 and so on... That said, I have to use a VLOOKUP function with the 4th argument as TRUE. This will return a VALUE. OFFSET will only work if I am referencing a CELL (not a VALUE). Does anyone know how to reference a CELL within an array??

    My function would ideally look something like this...

    =OFFSET(VLOOKUP($D4,$E$4:$E$100,2,TRUE),0,52) however this does not work for the reason stated above.


    Thanks to all!

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

    Re: VLOOKUP with OFFSET

    If you're offsettig by 'Columns', that's already built into the vlookup itself, the 3rd argument 'Colindex'.
    So you'd want to change the 2 to 54
    But also need to adjust the range to be 54 columns wide.

    Try
    =VLOOKUP($D4,$E$4:$BF$100,54,TRUE)

  3. #3
    Registered User
    Join Date
    02-24-2015
    Location
    Houston, TX
    MS-Off Ver
    2013 and 2010
    Posts
    26

    Re: VLOOKUP with OFFSET

    I can't simply change the columns. I am working with about 2200 dates and each date will fall within a certain week. I need to find the beginning week and then find the week a year later....

    The only thing I can think of is a vlookup with a true statement (it will not be an exact match), then offset that week to add 52 and return the corresponding week.


    Thanks again

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

    Re: VLOOKUP with OFFSET

    Well as you've discovered you can't offset from a vlookup.
    Because it returns a value, not a Cell/Range.

    But you CAN offset from an Index/Match.

    So given your original vlookup
    VLOOKUP($D4,$E$4:$E$100,2,TRUE)

    An equivelent Index/Match to that is
    =INDEX($F$4:$F$100,MATCH($D4,$E$4:$E$100,0))

    Then you can offset from that
    =OFFSET(INDEX($F$4:$F$100,MATCH($D4,$E$4:$E$100,0)),0,52)

  5. #5
    Registered User
    Join Date
    02-24-2015
    Location
    Houston, TX
    MS-Off Ver
    2013 and 2010
    Posts
    26

    Re: VLOOKUP with OFFSET

    The issue with the index match is that my value is approx. It won't be an exact match. The three options with match is exact, greater than, less than. I would need an greater/less than or equal...

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

    Re: VLOOKUP with OFFSET

    Sorry, missed the part that your original vlookup had TRUE...

    Change the 0 in the match to 1 (or omit it)
    =OFFSET(INDEX($F$4:$F$100,MATCH($D4,$E$4:$E$100)),0,52)

+ 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] Vlookup offset
    By Simon.xlsx in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-06-2014, 11:16 AM
  2. VLookup with Offset Help
    By mspiteri in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-31-2012, 11:49 AM
  3. Offset a vlookup?
    By JimmySmith in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-23-2012, 01:50 PM
  4. Vlookup & offset?
    By fudo in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-07-2008, 12:40 PM
  5. VLOOKUP and OFFSET
    By renita8781 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-07-2007, 09:40 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