+ Reply to Thread
Results 1 to 3 of 3

Index / match Return Multiple Strings between Two Dates

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    Modesto, CA
    MS-Off Ver
    Excel 2007
    Posts
    45

    Index / match Return Multiple Strings between Two Dates

    I have a three columns for 2018 Holidays :

    Subject Start Date End Date
    Weight Loss Awareness Month 1/1/2018 1/31/2018
    National Blood Donor Month 1/1/2018 1/31/2018
    National Hobby Month 1/1/2018 1/31/2018
    Golden Globes 1/7/2018 1/7/2018
    Girl Scout Cookie Season Begins 1/1/2018 1/31/2018
    Diet Resolution Week 1/1/2018 1/7/2018
    Hunt For Happiness 1/4/2018 1/20/2018
    New Year's Day 1/1/2018 1/1/2018
    Trivia Day 1/4/2018 1/4/2018


    I'm trying to use the following formula to return a list of "active" Holidays between two dates.

    =IFERROR(INDEX(Holidays,MATCH(1,(start_dates>=T$5)*(end_dates<=X$5),0)),"")

    The start date in this example would be 12/27/2017 and the end date would be 1/3/2018.

    Appreciate your consideration.
    Last edited by artikyulashun; 11-22-2017 at 02:13 PM.

  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
    53,048

    Re: Index / match Return Multiple Strings between Two Dates

    Regular INDEX/MATCH will only ever return the 1st match it finds, then stop looking.

    You will need to use something like the ARRAY formula INDEX(SMALL(IF))) for this

    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 Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Index / match Return Multiple Strings between Two Dates

    Try this array formula:

    =IFERROR(INDEX(A:A,SMALL(IF($B$2:$B$10<=$F$2,IF($C$2:$C$10>=$F$1,ROW($B$2:$B$10))),ROWS(H$2:H2))),"")

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

+ 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 formula to return multiple dates
    By lukela85 in forum Excel General
    Replies: 5
    Last Post: 10-25-2017, 07:07 AM
  2. [SOLVED] Index Match and return nth value between two dates
    By Knawl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2017, 06:32 PM
  3. Index Match using text strings and dates
    By ConcreteGuy79 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-30-2015, 02:54 PM
  4. Replies: 16
    Last Post: 07-21-2015, 12:56 PM
  5. Multiple Criteria Index/Match Function in VBA Looking Up Dates/Strings/Numbers
    By nadstradamus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2014, 12:35 PM
  6. Replies: 3
    Last Post: 06-06-2012, 01:44 PM
  7. Index & Match to return value between two dates
    By georgeanaprop in forum Excel General
    Replies: 2
    Last Post: 02-12-2010, 08:40 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