+ Reply to Thread
Results 1 to 9 of 9

Index/Match Formula for Date Range

  1. #1
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    263

    Index/Match Formula for Date Range

    See attached Excel spreadsheet with some sample data I made up. Sheet labeled "Single to Single Date Match" shows an Index/Match formula in cells E2:E5 that matches dates of service from Group 1 to Group 2 on and returns the invoice number for Group 2. I am trying to do a similar formula for sheet labeled "Single to Multi-Match", but not sure how to modify the formula, as I am trying to match up a single date specified in Column H to a date range specified in Columns B and C (e.g. if date in Column H falls between the to and from dates, then return the invoice number). Any ideas? Thanks.
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Index/Match Formula for Date Range

    hi there. maybe this array formula?
    =IFERROR(INDEX($J$2:$J$5,MATCH(1,($H$2:$H$5>=B2)*($H$2:$H$5<=C2)*($I$2:$I$5=D2),0)),"")

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Index/Match Formula for Date Range

    But what if there are multiple dates that lie in a date range?
    Cheers!
    Deep Dave

  4. #4
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    263

    Re: Index/Match Formula for Date Range

    Thanks benishiryo. That worked.

  5. #5
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    263

    Re: Index/Match Formula for Date Range

    Actually, good point Need for Excel..I modified the spreadsheet for multiple dates that lie in the range and nothing came back. Is there a way to get all dates in a range (assuming it had multiple dates)?

  6. #6
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Index/Match Formula for Date Range

    So if there are multiple dates, how would you want then to be displayed in a cell?

  7. #7
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    263

    Re: Index/Match Formula for Date Range

    Another good point..probably the first invoice number it found..

  8. #8
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Index/Match Formula for Date Range

    In that case, benishiryo's formula should work or you.

    Maybe you have not noticed, but Ben says its an array formula..

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

  9. #9
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    263

    Re: Index/Match Formula for Date Range

    Will do. Thanks.

+ 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] index match with sumif date range
    By namluke in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-09-2017, 09:45 AM
  2. Index match then returning a range of date values
    By jenniesmith in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-04-2015, 01:07 PM
  3. [SOLVED] INDEX date that MATCH on date range, MATCH code(string)
    By Dahlia in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-23-2014, 03:33 AM
  4. [SOLVED] Index Match Based on date range and name criteria
    By darkhangelsk in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-02-2014, 11:33 PM
  5. [SOLVED] INDEX MATCH based on 5 criteria, including a date range.
    By Folshot in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-05-2013, 09:35 PM
  6. [SOLVED] Index Match with date range criteria
    By NS4Excel in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 10-24-2013, 04:58 PM
  7. Index match, within a certain date range
    By Spreadsheetdaunting in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-08-2013, 01:02 AM

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