View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Charlotte E.[_3_] Charlotte E.[_3_] is offline
external usenet poster
 
Posts: 160
Default Time within time

Hi Guys,


I'm not sure if this can be solved with a standard workshhet function
(perferred), or if some kind of UDF is needed?

In two cells, I have a starting time in one cell, and an end time in
another cell.

I'm using 24-hours clocks.

Lets say I enter starting time 20:00, and end time 04:00 the next day.

Now I would like to know (in 3 other cells):

- How many hours are within these clock intervals:

21-23
23-00
00-03

With the given start and end time (20:00 and 04:00), it is fairly easy,
but problems occur (for me anyway :-), when starting and end time is
within the intervals, i.e.

Start 21:17
End 02:35

How to calculate how much time (hours and minutes) is within each of
these 3 intervals???

Thank you in advance,

CE