Identify overlapping dates and times in Excel

Mynda Treacy

July 21, 2022

I often get asked how to identify overlapping dates and times in Excel. Excel doesn’t have an ‘overlap’ function, but with SUMPRODUCT we can identify dates or times that fall within the same range. For example, let’s say you have list of appointments scheduled for the month. If you plot them visually in a calendar layout you can see that appointments B and C overlap, as do appointments E and F:

Identifying overlapping dates and times in excel

But how do you identify overlapping dates if you just have a table of start and end dates:

formula for Identifying overlapping dates and times in excel

Watch the Video

Subscribe YouTube

Download Workbook

Enter your email address below to download the sample workbook.

By submitting your email address you agree that we can email you our Excel newsletter.

Formula to Identify Overlapping Dates and Times in Excel

With SUMPRODUCT we can check if each start date is less than any of the end dates in the table AND, if each end date is greater than any of the start dates in the table. If the dates on each row meets this criteria for more than one set of dates in the table, then we know there are overlapping dates.

sumproduct formula for Identifying overlapping dates and times in excel

It returns TRUE if the date range overlaps with another date range in the table:

Identifying overlapping dates excel

It works the same with times:

Identifying overlapping times excel

Note: my data is structured in an Excel Table, therefore the cell references use the Table’s structured references.

Evaluating each component of the formula returns the following series of true and false results:

boolean logic

We can see in the first row of the table above that the start and end dates only match those on the first row (row 7), making this date range unique in the table. However, in the second row of the table shown below we can see there are two rows that match the dates on row 8:

boolean logic

And when you multiply true and false by one another, Excel converts them to their numeric equivalent or 1 and 0, resulting in this for the first row:

boolean logic

And this for the second row:

boolean logic

SUMPRODUCT returns the sum of the array and if it is greater than 1, it means there are two or more date ranges that overlap.

Identify overlapping dates and times in grouped data

If your data table contains groups, for example, multiple meeting rooms and you want to identify if each meeting room has an overlap, you can use the FILTER function to return the list of start/end times for that particular meeting room, as shown below:

identifying overlapping dates in grouped data in excel

The FILTER function returns the list of start and end times specific to each meeting room. Taking meeting room A as an example, it returns the following:

=SUMPRODUCT(

([@[Start Time]]<{8:30, 9:00, 11:00, 11:30})*

([@[End Time]]>{7:30, 8:30, 9:30, 10:30})

)>1

6 thoughts on “Identify overlapping dates and times in Excel”

  1. Need a formula to identify overlapping dates and times in a spreadsheet where each row has its own Meeting Room, DateFrom, DateTo, TimeFrom, TimeTo columns, we need to identify where the times are overlapping within the dates being evaluated for the meeting room in that row, not merely the dates alone regardless of the time or the time alone regardless of the date.

    Reply
    • Not easily. You’re welcome to post your question on our Excel forum where you can also upload a sample file and we can help you further. Be sure to also include the version of Excel that you have so we know the limitations.

      Reply
  2. Thank you for the informative information. And how exactly do you calculate the overlapping time period (in hours and minutes) between two different time frames?

    Reply

Leave a Comment

Current ye@r *