+ Reply to Thread
Results 1 to 4 of 4

Count overlapping months from date ranges

  1. #1
    Registered User
    Join Date
    10-18-2017
    Location
    Minnesota
    MS-Off Ver
    2016
    Posts
    2

    Count overlapping months from date ranges

    Hi everyone,

    Longtime browser of site and this is my first post!!

    So I've been struggling with finding a formula that will help me count how many months are overlapping between more than 2 date ranges. Below is a sample of that data I am working with.

    Overlapping screenshot.JPG

    I was able to find a formula that would tell me what date spans were overlapping:
    Cell H2: =IF(SUMPRODUCT(--(A:A=A2)*--(F:F<G2)*--(G:G>F2))>1,"Overlapping","")

    I thought I could use that to then use a formula that would evaluate all the dates and tell me how many months of overlap there are. In this example I would expect 9 months of overlap.

    If anyone can help with this I'd greatly appreciate it!!
    Attached Files Attached Files
    Last edited by jasonnj1978pwest; 10-18-2017 at 11:44 AM.

  2. #2
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Count overlapping months from date ranges

    An attachment would be easier to work with, especially if you explain your calculations for what is your expected result is.

    but a few questions
    what is your definition of months of overlap?
    if 1 day is an overlap, does it count as a full month?
    if 3 rows overlap do you only count the months when any of them overlap?
    will the rows always be sorted by mbrprimary id and then ascending dt_ymdeff?


    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    10-18-2017
    Location
    Minnesota
    MS-Off Ver
    2016
    Posts
    2

    Re: Count overlapping months from date ranges

    Thanks for the reply davsth.

    To answer your questions:
    1. Yes, 1 day of overlap would count as a full month
    2. Yes, only count months of the rows that overlap whether it's 1 row or 10 rows.
    3. The rows will be sorted by primary_id and then by dt_ymdend ascending (oldest new newest)

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Count overlapping months from date ranges


+ 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. Count Overlapping dates in multiple date ranges with a criteria
    By jenn.murphy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-05-2016, 03:07 PM
  2. Determining Overlapping items of 3 date ranges
    By mrsin1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2016, 11:10 AM
  3. Overlapping Date ranges
    By pvd12 in forum Excel - New Users/Basics
    Replies: 9
    Last Post: 01-07-2016, 03:01 AM
  4. Count number of overlapping days in multiple date ranges
    By tarsonis in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 05-08-2015, 03:22 PM
  5. 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
  6. 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
  7. 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