Hi Folks.. I thought I had all bases covered but after rechecking calculations in my Coastguard Rescue Worksheet system, I've discovered a problem and I can't seem to work it out.
If a Rescue Officer is called out at 23:00 and is back at 04:00, this should equate to 5 hours worked.
It seems that if my times are all on one side or the other of a 24 hour cycle, my calculation work fine but it it breaks across the 24 hour (as above, it doesn't work.
A2=04:00
A1=23:00
Using (A2-A1)*24 give me -19.00 hours
My SS macro has a line:
s = (wks.Cells(c, 3) - wks.Cells(c, 2)) * 24 'calculates the duration of time worked
Is there any way of getting excel to calculate an elapsed time in hours when the start and end times roll over from one day to the next?
Hope that makes sense.
Declan
If a Rescue Officer is called out at 23:00 and is back at 04:00, this should equate to 5 hours worked.
It seems that if my times are all on one side or the other of a 24 hour cycle, my calculation work fine but it it breaks across the 24 hour (as above, it doesn't work.
A2=04:00
A1=23:00
Using (A2-A1)*24 give me -19.00 hours
My SS macro has a line:
s = (wks.Cells(c, 3) - wks.Cells(c, 2)) * 24 'calculates the duration of time worked
Is there any way of getting excel to calculate an elapsed time in hours when the start and end times roll over from one day to the next?
Hope that makes sense.
Declan