+ Reply to Thread
Results 1 to 4 of 4

Index + Match + Lookup -- return next largest date

  1. #1
    Registered User
    Join Date
    12-29-2015
    Location
    Sunnyvale, CA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Index + Match + Lookup -- return next largest date

    Hello Friends -- first time posting on this forum and thankful for all that you do here. I've been puzzling this out for a while and could use some help.

    I have a spreadsheet of employees with benefits change records. My system only tracks start dates for each benefit change, so I need to use the next change record for an employee in my spreadsheet to calculate an end date.

    For each record I have the employee number, coverage level and effective date. I'm trying to use INDEX + MATCH + LOOKUP to give me the date of the next record in the range for the employee.

    Formula so far is:

    =INDEX(D:D,MATCH(D2,A:A)+LOOKUP(D2,A:A)>D2)

    Unfortunately, this is returning the same date and not the next largest date in the range. Another version I tried returned the max date. I need the next closest larger date.

    Sample Spreadsheet.xlsx

    Hope this is clear. Any ideas? This one has me stuck. Thanks so much!

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

    Re: Index + Match + Lookup -- return next largest date

    Try this in F2

    =VLOOKUP(B2,$B3:$E$8,4,0)

    Notice the lookup range ($B3:$E$8) begins 1 row after the lookup value, and ENDS 1 row beyond the end of data.
    That is intentional. Also notice the arrangement of the absolute symbols $

  3. #3
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,286

    Re: Index + Match + Lookup -- return next largest date

    I turned out.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-29-2015
    Location
    Sunnyvale, CA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Thumbs up Re: Index + Match + Lookup -- return next largest date

    Thank you both! Both of these solutions seem dependent on sorting the spreadsheet by ascending ID Code + effective date of coverage. Is there a way to solve this without a particular sort?

+ 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. Replies: 6
    Last Post: 12-19-2015, 10:16 PM
  2. Replies: 4
    Last Post: 04-04-2015, 04:24 AM
  3. Lookup using Index & Match to Return Unique Output
    By apdiego in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-02-2013, 03:45 AM
  4. Return a value with which combo of Lookup/Match/Index?
    By erickguz in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-20-2013, 04:27 AM
  5. [SOLVED] Lookup/Index/Match to Return Value of Higher number rather than lower# when inbetween
    By ReedDOT in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-16-2013, 11:56 PM
  6. [SOLVED] Lookup match index multiple values return other columns
    By martypocock in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 11-07-2012, 10:57 PM
  7. Replies: 30
    Last Post: 12-19-2011, 12:13 PM

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