+ Reply to Thread
Results 1 to 6 of 6

Index/Match with closest date greater than value

  1. #1
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Denver, CO
    MS-Off Ver
    Excel 2013
    Posts
    118

    Index/Match with closest date greater than value

    Hello,

    I have a data set of sales employees that shows the history of their job titles along with an effective date for each title. I'm trying to match that up with a list of sales based on executed date. Each sale has the sales rep name and the executed date. I need to bring in the job title for that rep at the time of the sale.

    I've got two formulas right now that I think can get me what I need, but I can't seem to combine them:

    Column BE: Last Name
    Column BD: First Name
    Column M: Executed Date

    This first one is just a match up of first and last name along with trying to grab effective dates that occur after any title change.
    Please Login or Register  to view this content.
    However, the above is bringing in the very first title, I need the title associated with the max effective date that occurs before the executed date, so I found the formula below:
    Please Login or Register  to view this content.
    The problem with the above is that it's looking at the entirety of the employee based. I need it refined down to only be looking at the set of dates associated with the particular sales rep on that row (in this case row 5).

    Any ideas?

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Index/Match with closest date greater than value

    Can you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Denver, CO
    MS-Off Ver
    Excel 2013
    Posts
    118

    Re: Index/Match with closest date greater than value

    Here's a small set of data.example.xlsx

  4. #4
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Denver, CO
    MS-Off Ver
    Excel 2013
    Posts
    118

    Re: Index/Match with closest date greater than value

    Hmm, Is it as easy as changing my MATCH statement in the first formula from match type = 0 to =1?

    EDIT: no, no it is not that easy.
    Last edited by weeble33; 08-18-2015 at 01:55 PM.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Index/Match with closest date greater than value

    I will take a look at your file, but try that and see

  6. #6
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Denver, CO
    MS-Off Ver
    Excel 2013
    Posts
    118

    Re: Index/Match with closest date greater than value

    I've got it working (at least for everything I've checked so far), but I don't fully understand my solution.

    Please Login or Register  to view this content.
    Essentially not only does the match type change to 1, but changing the string of the conditional if statements to return a -1 for a true path. This requires the Staffing table to be sorted oldest to newest, but it's at least a workaround. I'd still appreciate any solutions that wouldn't involve a sort order on the source data.

+ 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: 2
    Last Post: 12-18-2014, 09:52 AM
  2. Index&Match formula for closest match(s)
    By hom100 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-16-2014, 02:40 PM
  3. Index with closest date and ID match
    By Beccah in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-19-2014, 06:01 AM
  4. Index closest match
    By MJSlattery in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-16-2013, 10:27 PM
  5. [SOLVED] Index-Match Closest Value
    By CzechCzar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-25-2013, 07:40 PM
  6. Match the Upper closest value using Index Match.
    By adnanaddo in forum Excel General
    Replies: 3
    Last Post: 01-16-2013, 02:47 AM
  7. [SOLVED] match closest date in range but not greater than limits
    By Oldeuboi in forum Excel General
    Replies: 9
    Last Post: 11-25-2012, 12:15 PM

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