ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I convert 8:30 to 8.5 hours? (https://www.excelbanter.com/excel-worksheet-functions/50616-how-do-i-convert-8-30-8-5-hours.html)

Gene Mah

How do I convert 8:30 to 8.5 hours?
 
I am trying to create a scheduler and need to find out the hours worked in a
given day. For example, I worked from 9:00 AM to 5:30 PM with an hour break.
I would like to return a value of 8.5 hours minus 1 hour equals 7.5 hours.
Thanks.

Peo Sjoblom

Multiply by 24 and format as either general or number (don't format as time)
to subtract an hour you can just subtract one

=(end-start)*24-1

if your lunch can differ you set it up like

=(D1-A1-(C1-B1))*24

where D1 is end, A1 start, B1 lunch out and C1 lunch in



--
Regards,

Peo Sjoblom

(No private emails please)


"Gene Mah" <Gene wrote in message
...
I am trying to create a scheduler and need to find out the hours worked in
a
given day. For example, I worked from 9:00 AM to 5:30 PM with an hour
break.
I would like to return a value of 8.5 hours minus 1 hour equals 7.5 hours.
Thanks.



Gene Mah

The problem is I have at least 30 employees and it gets more complicated.
It's hard to explain, but I can send you the worksheet so I can explain it
better.
Thanks.


"Peo Sjoblom" wrote:

Multiply by 24 and format as either general or number (don't format as time)
to subtract an hour you can just subtract one

=(end-start)*24-1

if your lunch can differ you set it up like

=(D1-A1-(C1-B1))*24

where D1 is end, A1 start, B1 lunch out and C1 lunch in



--
Regards,

Peo Sjoblom

(No private emails please)


"Gene Mah" <Gene wrote in message
...
I am trying to create a scheduler and need to find out the hours worked in
a
given day. For example, I worked from 9:00 AM to 5:30 PM with an hour
break.
I would like to return a value of 8.5 hours minus 1 hour equals 7.5 hours.
Thanks.





All times are GMT +1. The time now is 08:40 PM.

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