How to calculate date/time overlap in days or hours in Excel?
Author: SunLast Modified: 2020-09-01
Supposing there are some date ranges recorded in a sheet, and now you want to calculate how many days or hours of those date ranges overlap with a specific date range as below screenshot shown. Except to compare date ranges and calculate one by one, here in this article, I introduce a formula to quickly solve this task in Excel.
Select a blank cell that you want to place the calculated result, enter this formula =MAX(MIN($G$2,C2)-MAX($G$1,B2)+1,0), and drag auto fill handle down to fill this formula to other cells. See screenshot:
This formula also can calculate the time overlap in hours.
Tip.If you want to quickly count weekdays/weekends/specific day between two dates, please try to use the Kutools for Excel’s Formular Helper as shown in the following screenshot. It’s full function without limitation in 30 days, please download and have a free trial now.
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...