View Single Post
  #6   Report Post  
Steve Smallman
 
Posts: n/a
Default

Start time in column A, end time in column b, calc in column C
23:30 in A2, 02:00 in B2 formula in C2 =if(B2<A2, b2+1-a2, b2-a2) assumes
all tests less than 24 hours
alternatively, enter 01/01/01 23:30 in A2 and 02/01/01 02:00 in the cells
(using appropriate dates and formats)

the problem is that if you subtract 12:00 from 06:00 (i.e. start at noon and
finish at 6am next day) you are subtracting .5 from .25 in a date format,
resulting in a negative, and excel does not recognise dates as being a
negative.

I suggest you read up on the way Excel handles dates and times as the task
you are attempting can be complex.

Try Chip Pearson's site, an excellent reference

Steve

"andrew pronto" .(donotspam) wrote in message
...
I want to calculate a period of time in 24 hours to be able to work out the
running speed of a machine. This is ok using say 18:00 to 21:00 the
resulting
time can be shown as a decimal & the machine output divided by the result,
however how do I calculate the difference over the midnight period ie say
11:30 to 02:00?
--
Andrew P.