View Single Post
  #3   Report Post  
okaizawa
 
Posts: n/a
Default

Hi,

this is an example that returns the number of days in the intersection
of two periods.

=MAX(MIN(EndDate1,EndDate2)-MAX(StartDate1,StartDate2)+1,0)

(assuming StartDate1<=EndDate1 and StartDate2<=EndDate2 are true.
and the period includes the start date and the end date.)

--
HTH,

okaizawa

MissSara wrote:
Hello, I need a function which allows me to enter the start and end dates
for two date-periods, then returns 'True' if there is any crossover
(intersection) between the two periods. In simple terms if there is any day
(or days) which appears in both periods.

Can I do this with worksheet functions? or do I need VBA? Very grateful for
any tips on how I code it.

Sara