• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member
  • Login

Identify overlapping dates and times in Excel

You are here: Home / Excel Formulas / Identify overlapping dates and times in Excel
identify overlapping dates and times in excel
July 21, 2022 by Mynda Treacy

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.
Please enter a valid email address.

Download the Excel Workbook and follow along. Note: This is a .xlsx file please ensure your browser doesn't change the file extension on download.

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
identify overlapping dates and times in excel
Mynda Treacy

Microsoft MVP logo

AUTHOR Mynda Treacy Co-Founder / Owner at My Online Training Hub

CIMA qualified Accountant with over 25 years experience in roles such as Global IT Financial Controller for investment banking firms Barclays Capital and NatWest Markets.

Mynda has been awarded Microsoft MVP status every year since 2014 for her expertise and contributions to educating people about Microsoft Excel.

Mynda teaches several courses here at MOTH including Excel Expert, Excel Dashboards, Power BI, Power Query and Power Pivot.

More Excel Formulas Posts

Excel BYROW and BYCOL Functions

Excel BYCOL and BYROW Functions

Excel BYCOL and BYROW functions fundamentally change the way we write formulas that calculate across columns and down rows.
python in excel natively

How to Use Python in Excel Natively

How to use Python in Excel natively using libraries like Pandas, NumPy, Matplotlib, Seaborn and more for analysis and spectacular charts!
excel dynamic named ranges

Excel Dynamic Named Ranges

Excel Dynamic Named Ranges update automatically to include new data in the ranges referenced in your formulas and PivotTables etc.
functions for financial modelling

Excel Functions for Financial Modeling

Top 23 must know Excel functions for Financial Modeling. Includes example Excel file and step by step instructions.
excel formula by example

Excel Formula by Example

Excel can now write a formula by example. Simply give it an example or two of the result and Excel will write the formula.
ai-aided excel formula editor

AI Aided Excel Formula Editor

Save time with this free AI Excel formula editor add-in that writes, edits, improves and interprets formulas for you!
top excel functions for data analysts

Top Excel Functions for Data Analysts

Must know Excel Functions for Data Analysts and what functions you don’t have to waste time learning and why.
excel advanced formula environment

Excel Labs (Formerly, Advanced Formula Environment)

Excel Labs is a long awaited, new improved way to write, name and store Excel formulas, including LAMBDAS with the help of AI.
Pro Excel Formula Writing Tips

Pro Excel Formula Writing Tips

Must know Excel formula writing tips, tricks and tools to make you an Excel formula ninja, including a new formula editor.
excel shaping arrays

New Array Shaping Excel Functions

The Excel Shaping Array Functions makes it easier than ever to reshape arrays and ranges using these purpose built functions


Category: Excel Formulas
Previous Post:excel online5 Excel Online Features Better than Desktop
Next Post:Import Data from a Picture to ExcelImport data from a picture to Excel

Reader Interactions

Comments

  1. Nat

    August 22, 2023 at 9:05 am

    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
    • Mynda Treacy

      August 22, 2023 at 9:21 am

      Hi Nat, please post your question on our Excel forum where you can also upload a sample file and we can help you further.

      Reply
  2. Martin

    July 11, 2023 at 8:53 pm

    Awesome, thank you! Any idea how we can do something similar to the FILTER in non-365 versions of Excel?

    Reply
    • Mynda Treacy

      July 12, 2023 at 12:35 pm

      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
  3. Gadi Bizinyan

    October 12, 2022 at 2:48 am

    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
    • Mynda Treacy

      October 12, 2022 at 1:02 pm

      I’m not sure what you mean by ‘locate’. Perhaps you can post your question on our Excel forum where you can also upload a sample file and we can help you further.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Current ye@r *

Leave this field empty

Sidebar

More results...

office scripts course

Popular Content

  • 10 Common Excel Mistakes to Avoid
  • Top Excel Functions for Data Analysts
  • Secrets to Building Excel Dashboards in Less Than 15 Minutes
  • Pro Excel Formula Writing Tips
  • Hidden Excel Double-Click Shortcuts
  • Top 10 Intermediate Excel Functions
  • 5 Pro Excel Dashboard Design Tips
  • 5 Excel SUM Function Tricks
  • 239 Excel Keyboard Shortcuts

100 Excel Tips and Tricks eBook

Download Free Tips & Tricks

239 Excel Keyboard Shortcuts

Download Free PDF

mynda treacy microsoft mvpHi, I'm Mynda Treacy and I run MOTH with my husband, Phil. Through our blog, webinars, YouTube channel and courses we hope we can help you learn Excel, Power Pivot and DAX, Power Query, Power BI, and Excel Dashboards.

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel Office Scripts
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook

Sign up to our newsletter and join over 400,000
others who learn Excel and Power BI with us.

 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate
  • Sponsor Our Newsletter

Support

  • Contact
  • Forum
  • Helpdesk – For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.