+ Reply to Thread
Results 1 to 3 of 3

Calculate number of non-overlapping days from multiple start/end date ranges

  1. #1
    Registered User
    Join Date
    10-28-2020
    Location
    Ottawa, Canada
    MS-Off Ver
    Office 365
    Posts
    1

    Question Calculate number of non-overlapping days from multiple start/end date ranges

    Hello all - never posted in a forum before. I've been searching the internet for a solution, but can't find one so I hope I describe this properly.

    I have a list of multiple date ranges in excel (Office 365).

    Column A is the start date, column B is the end date.

    Some of these date ranges overlap one another.

    I want to calculate the total number of non-overlapped days from the earliest start date in the list to the latest end date in the list.

  2. #2
    Forum Contributor
    Join Date
    11-21-2013
    Location
    zimbabwe
    MS-Off Ver
    Excel 2003
    Posts
    124

    Re: Calculate number of non-overlapping days from multiple start/end date ranges

    Hi there
    Suppose that your days list is in A1:A9 and B1:B9 ranges
    You can count the total number of non-overlapped days as follows:
    Please Login or Register  to view this content.
    End it with CTRL+SHIFT+ENTER combination
    Hope this heps

  3. #3
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Calculate number of non-overlapping days from multiple start/end date ranges

    First specs. If start date were 30 Oct 2020 and end date were 1 Nov 2020, would that be 2 or 3 days? I'll assume 3.

    There's the efficient way using multiple cells, and the clever way using a single formula.

    Efficient: if your start dates were in A2:A25 and end dates in B2:B25, and the table were sorted by col A in ascending order, add alternative start dates in C2:C25.

    C2: =A2-1
    C3: =IF(COUNTIF(B$2:B2,">="&A3),MAX(B$2:B2),A3-1)

    Fill C3 down into C4:C25. Non-overlapping days would be given by =SUM(B2:B25-C2:C25).

    Clever: this uses the latest functions.

    =LET(x,SEQUENCE(1,MAX(B2:B25)-MIN(A2:A25)+1,MIN(A2:A25),1),COUNT(1/MMULT(SEQUENCE(1,ROWS(A2:A25),1,0),(x>=A2:A25)*(x<=B2:B25))))
    Last edited by hrlngrv; 10-29-2020 at 04:32 AM. Reason: typos

+ 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. Counting number of overlapping days between mulitple date ranges
    By cry04 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 07-26-2020, 06:37 PM
  2. Replies: 15
    Last Post: 04-08-2020, 01:56 PM
  3. [SOLVED] counting number of days in overlapping date ranges
    By afgi in forum Excel General
    Replies: 11
    Last Post: 07-18-2018, 03:02 PM
  4. [SOLVED] To calculate number of days including start date
    By gautham_p in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 05-11-2016, 10:47 AM
  5. 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
  6. 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
  7. Replies: 8
    Last Post: 05-10-2013, 05:37 AM

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