+ Reply to Thread
Results 1 to 6 of 6

In between dates and looking up other dates

  1. #1
    Registered User
    Join Date
    03-25-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2013
    Posts
    3

    In between dates and looking up other dates

    Hello everyone,

    I've got a headscratcher. I have one sheet with a list of people with codes that have a start date and an end date. On another sheet with a list of holidays and black out dates. I need to see if any people from sheet one that have codes on or between the start and end dates during any of the holidays on sheet two and whether or not it's a blackout date and/or a holiday. I have attached a screenshot of each sheet. Ideally, I would like to show the answers to show in column E of sheet 1.

    For example: (Sheet 1)

    A B C D E
    1 102 BCC 3/27/2015 3/30/2015 Blackout Date
    2 102 OGG 12/25/2015 12/25/2015 Holiday
    3 102 SMF 12/6/2015 12/8/2015

    (Sheet 2)


    Date Day of Week Holiday Black Out Dates Holiday
    1 1/1/2012 Sunday New Year's Day Black Out Holiday
    2 1/2/2012 Monday New Year's Day Black Out
    3 1/3/2012 Tuesday New Year's Day Black Out
    4 1/16/2012 Monday Martin Luther King Day Holiday
    5 2/14/2012 Tuesday Valentine's Day Holiday
    6 2/17/2012 Friday Predidents Day Weekend Black Out
    7 2/18/2012 Saturday Predidents Day Weekend Black Out


    I've been trying many kinds of things all week and am at a loss. Any help would be greatly appreciated!

    Thank you!
    Attached Images Attached Images

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: In between dates and looking up other dates

    Could you please attach the actual file so we don't have to reproduce it manually. Thanks.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    03-25-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: In between dates and looking up other dates

    File is attached!
    Attached Files Attached Files

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: In between dates and looking up other dates

    Very simple: =TRIM(SUBSTITUTE( IF(SUMPRODUCT((Table2[Date]>=[@[Start Date]])*(Table2[Date]<=[@[End Date]]))>0,INDEX(Table2,IF(SUMPRODUCT((Table2[Date]>=[@[Start Date]])*(Table2[Date]<=[@[End Date]]))>0,MATCH([@[Start Date]],Table2[Date],1),""),4),"") & " " &IF(SUMPRODUCT((Table2[Date]>=[@[Start Date]])*(Table2[Date]<=[@[End Date]]))>0,INDEX(Table2,IF(SUMPRODUCT((Table2[Date]>=[@[Start Date]])*(Table2[Date]<=[@[End Date]]))>0,MATCH([@[Start Date]],Table2[Date],1),""),5),""),0,""))

    Actually it you look at the helper columns it's a lot easier to understand.
    Attached Files Attached Files

  5. #5
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: In between dates and looking up other dates

    This code uses Match (Value, Range, 1) which means that the dates in Table2 (Holidays and Blackouts) must be sorted in ascending (oldest to newest) order.

  6. #6
    Registered User
    Join Date
    03-25-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: In between dates and looking up other dates

    Simply amazing! That's certainly outside the box. I can't thank you enough!

+ 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: 0
    Last Post: 01-03-2016, 06:07 PM
  2. Populating list of dates from another sheet with Start Dates and End Dates
    By Jesshloly in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-05-2015, 04:07 AM
  3. Check dates in range either same dates or different dates by formula
    By breadwinner in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-12-2013, 07:42 AM
  4. Replies: 6
    Last Post: 03-11-2013, 06:11 PM
  5. [SOLVED] Array of dates when tested shows no dates ......but there are dates
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-29-2012, 12:45 PM
  6. [SOLVED] Highlight Group of Dates if Dates Match List of other Dates
    By martinpgibson in forum Excel General
    Replies: 5
    Last Post: 10-24-2012, 08:14 PM
  7. [SOLVED] Auto filling dates based on previously entered dates and averaging numbers if dates equal
    By grambograham in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-11-2012, 03:21 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