Overlapping dates

heatherrink

New Member
Joined
Oct 29, 2012
Messages
5
Hi there, please can you assist with my question - I have 5 sets of start and end dates each for 5 therapies. I need to determine if any of these 5 date periods overlap. I have inserted an example below, (in this case the person is only on 2 therapies, but I dont think it matters to my overall question). Do you have any idea how I can accomplish this in a formula? Thanks very much.

Premix First Date</SPAN></SPAN>
Premix Last Date</SPAN></SPAN>
Non-Premix First Date</SPAN></SPAN>
Non-Premix Last Date</SPAN></SPAN>
Fast Acting First Date</SPAN></SPAN>
Fast Acting Last Date</SPAN></SPAN>
Orals First Date</SPAN></SPAN>
Orals Last Date</SPAN></SPAN>
GDS First Date</SPAN></SPAN>
GDS Last Date</SPAN></SPAN>
.</SPAN></SPAN>
.</SPAN></SPAN>
14-Sep-05</SPAN></SPAN>
09-Oct-07</SPAN></SPAN>
03-Nov-99</SPAN></SPAN>
15-Jul-05</SPAN></SPAN>
.</SPAN></SPAN>
.</SPAN></SPAN>
.</SPAN></SPAN>
.</SPAN></SPAN>

<TBODY>
[TD="colspan: 2"] 1</SPAN></SPAN>
[/TD]
[TD="colspan: 2"] 2</SPAN></SPAN>
[/TD]
[TD="colspan: 2"] 3</SPAN></SPAN>
[/TD]
[TD="colspan: 2"] 4</SPAN></SPAN>
[/TD]
[TD="colspan: 2"] 5</SPAN></SPAN>
[/TD]

</TBODY>
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
heatherrink,

Not sure if there is a more elegant solution so perhaps something like this.......


Excel 2007
ABCDEFGHIJK
1Premix First DatePremix Last DateNon-Premix First DateNon-Premix Last DateFast Acting First DateFast Acting Last DateOrals First DateOrals Last DateGDS First DateGDS Last Date
214/09/200509/10/200703/11/199915/07/2005FALSE
315/07/200509/10/200703/11/199915/07/2005TRUE
Sheet1
Cell Formulas
RangeFormula
K2=OR(IFERROR((RANK(A2,A2:J2)-RANK(B2,A2:J2))<>1,FALSE),IFERROR((RANK(C2,A2:J2)-RANK(D2,A2:J2))<>1,FALSE),IFERROR((RANK(E2,A2:J2)-RANK(F2,A2:J2))<>1,FALSE),IFERROR((RANK(G2,A2:J2)-RANK(H2,A2:J2))<>1,FALSE),IFERROR((RANK(I2,A2:J2)-RANK(J2,A2:J2))<>1,FALSE),SUMPRODUCT(--(COUNTIF(A2:J2,A2:J2)>1)))


It should, hopefully, return TRUE if there is any overlap of the 5 sets of dates.

Hope that helps.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

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