ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   time calculations (https://www.excelbanter.com/excel-discussion-misc-queries/47160-time-calculations.html)

Aline

time calculations
 
Hello!

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


Bob Phillips

=(end_time-start_time)*24

--
HTH

Bob Phillips

"Aline" wrote in message
oups.com...
Hello!

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




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 CellsNumberCustom as [hh]:mm to allow Excel to sum past 24 hours.

Change ranges to suit.

Regards

Roger Govier


Aline wrote:
Hello!

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


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:

=(end_time-start_time)*24

--
HTH

Bob Phillips

"Aline" wrote in message
oups.com...
Hello!

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



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.

Aline wrote:

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:

=(end_time-start_time)*24

--
HTH

Bob Phillips

"Aline" wrote in message
oups.com...
Hello!

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


--

Dave Peterson


All times are GMT +1. The time now is 10:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com