+ Reply to Thread
Results 1 to 4 of 4

Create Unique Overlapping Date Ranges from List of Dates

  1. #1
    Registered User
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Create Unique Overlapping Date Ranges from List of Dates

    Hi all

    Looking for any help that is out there but not sure if this should fall under formula's or vba code help.

    Using the below data, I need a formula or vba code to determine all the different overlapping date ranges that exist when looking at combining all 3 legs.

    Market Travel Start Travel End
    Leg 1 01/06/15 11/11/15
    Leg 2 22/05/15 05/06/15
    Leg 2 01/07/15 09/09/15
    Leg 2 10/10/15 22/11/15
    Leg 3 10/07/15 05/09/15
    Leg 3 01/11/15 25/12/15


    So when looking at a combination of "Leg 1,2,3". My results using the above data would be below. These are the only 2 date ranges that overlap for all 3 Legs.

    Market Travel Start Travel End
    Leg 1,2,3 10/07/15 05/09/15
    Leg 1,2,3 01/11/15 11/11/15

    I hope this makes sense.

    Thanks


    Dean

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Create Unique Overlapping Date Ranges from List of Dates

    Hi,

    I don't understand your definition of 'overlapping'. Please explain your thought process that caused you to choose the two results you show. i.e. give us the rules you have applied with reference to specific cells & dates.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    09-02-2013
    Location
    Netherlands
    MS-Off Ver
    Office 365 (2013)
    Posts
    268

    Re: Create Unique Overlapping Date Ranges from List of Dates

    Richard,.. overlapping means that the results are in all legs (1,2 and 3)
    Inveniam Viam Aut Faciam

  4. #4
    Registered User
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Create Unique Overlapping Date Ranges from List of Dates

    Hi Richard

    Yes Evolta is correct.

    I only want the results to pull travel periods which are available for all three legs.

    So with table of dates, the only travel periods where all three are overlapping are "10/07/15 to 05/09/15" and "01/11/15 to 11/11/15".

    If we look at the first date range of "10/07/15 to 05/09/15" and de-construct this, the logic is as follows:

    - To get the 1st date of 10/07/15 - Leg 1 has a date starting from "01/06/15 to 11/11/15" and Leg 2 has a date starting from "01/07/15 to 09/09/15" however as Leg 3 has a date starting from "10/07/15 to 05/09/15". So the earliest possible date that all 3 overlap is 10/07/15.
    - For the end date of 05/09/15 - looking at the dates above, as Leg 3 ends on "05/09/15", this is the last time from the above dates that all 3 legs are available.


    I hope that helps.

    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] Create unique list of values from two ranges with criteria
    By ThirtyTwo in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 06-13-2014, 10:46 AM
  2. Calculating # of Overlapping days with several date ranges.
    By CarlSVM in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-06-2014, 07:09 AM
  3. Charting Amounts Between Overlapping Date Ranges
    By thomasutley in forum Excel General
    Replies: 0
    Last Post: 09-27-2011, 12:43 PM
  4. how to count # rows having overlapping date ranges
    By jrtaylor in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-13-2011, 01:54 PM
  5. preventing overlapping date ranges
    By xlfan in forum Excel General
    Replies: 2
    Last Post: 03-01-2011, 10:03 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