Find the intersection of 4 periods

Flyingjoblo

New Member
Joined
Mar 25, 2023
Messages
5
Office Version
  1. 2003 or older
Platform
  1. MacOS
Hi everyone,
I am looking for a way to find the number of days at the intersection of 4 different periods using max/min formulas as stated in an old thread of 2009.
Anyone interested to help?
Exemple:
How many days included in all of the following periods:
1/3/2023-5/4/2025
6/6/2022-8/10/2030
9/1/2025-15/1/2025
10/2/2028-20/2/2028
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi,

To calculate date overlap in days, you have not indicated your reference period ...
 
Upvote 0
As far as the generic Overlap formula is concerned... with Start1 and End1 for your Reference Date :

Excel Formula:
=MAX(MIN(End1,End2)-MAX(Start1,Start2)+1,0)
 
Upvote 0
Thank you James006 for your reply. The reference is a 5th period.

ie : 1/4/2024-2/10/2027
 
Upvote 0
Thanks for the Reference Period

When you say 7 is the result ... it is the result of your Reference Period versus your third item in your list : 9/01/2025 -15/01/2025

Otherwise, you will get : 370 days and 1'280 days for first and second periods ...
 
Upvote 0
Not exactly. Period 1, Period 2, Period 3 & Period 4 have only 7 days in common in the reference period (1/4/2024-2/10/2027)
 
Upvote 0
my apologies... period 4 is outside of the ref period. result is 0 in that particular case.

Let's assume P4 (11/1/2025-17/2/2025) instead. Result becomes 5.
 
Upvote 0
With the generic formula in post #3 ... you can perform all the calculations you need ...
 
Upvote 0
Book1
ABC
11/03/20235/04/2025period 1
26/06/20228/10/2030period 2
39/01/202515/01/2025period 3
410/02/202820/02/2028period 4
5
61/04/20242/10/2027reference period
7
87Is this it?
9
Sheet1
Cell Formulas
RangeFormula
A8A8=MINIFS(B1:B4,B1:B4,"<="&B6)-MINIFS(A1:A4,A1:A4,">="&A6)+1
 
Upvote 0

Forum statistics

Threads
1,215,461
Messages
6,124,955
Members
449,199
Latest member
Riley Johnson

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top