Intersect for time

  • Thread starter Thread starter Jorgen Bondesen
  • Start date Start date
J

Jorgen Bondesen

Hi NG


I need help.

1 day = 24 h

Start time A1: 8 h
Using time A2: 3 h
Or
Using time A2: 5 h


Break1 start B1: 9
Break1 end B2: 9:15

Break2 start C1: 12
Break2 end C2: 12:3

I want to know when Break1 and/or Break2 are a intersect in time range: 8 to
8+3=11 / 8+5=13

Is there a function like (I know this is for Range):
Set isect = Application.Intersect(Range("rg1"), Range("rg2"))

Both a solution for VBA and formula will be fine, but i prefere VBA
 
Hello Joergen,

If you use the time format for al the cells you mentioned in your
question you could use a formula:

=IF(AND(A1<B1;A1+A2>C2);"Intersect 1 +
2";IF(AND(A1<B1;A1+A2>B2);"Intersect
1";IF(AND(A1<C1;A1+A2>C2);"Intersect 2";"")))

Thuis is a single formula, remove the linebreaks taht might be
inserted by the newsgroup system.


HTH,

Wouter
 
Back
Top