Intersect for time

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
 
W

Wouter HM

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top