time calculations

A

Aline

Hello!

Does anyone know how you can calculate worked hours in a day on the
basis of a start and end time?
 
R

Roger Govier

Hi Aline

With start time in column A, and end time in column B, enter in C1
=MOD((B1-A1),1)
will give the time interval, even allowing for time period where the start
is on one day, and the finish is on the next.
Input time on a 24 hour basis 16:30 for 4:30 pm.

If you want to sum the hours worked, then just =SUM(C1:C100) but format the
cell with the formula
Format Cells>Number>Custom as [hh]:mm to allow Excel to sum past 24 hours.

Change ranges to suit.

Regards

Roger Govier
 
A

Aline

Thanks Bob,

But it does not work on my example. For instance, starting time is
22.00hr, end time 06.00 hr; total worked hours would have to result in
8 hrs.

Bob Phillips schreef:
 
D

Dave Peterson

=((end_time-start_time)+if(end_time<start_time,1,0))*24
or shorter:
=((end_time-start_time)+(end_time<start_time))*24

Another option would be to include the time and date for each entry.
 
Top