ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Timeclock Calculation (https://www.excelbanter.com/excel-worksheet-functions/62047-timeclock-calculation.html)

john327

Timeclock Calculation
 
I would like to set up a table in excel that allows me to enter, for example:
A time punched in (8:00 AM), time punched out (12:00 Noon) (for lunch) a time
punched back in (1:00 PM), a time punched out (5:00 PM).
I would like a final cell to calculate total work hours as 8 hours
worked for the day.

Arvi Laanemets

Timeclock Calculation
 
Hi

A1:E1 - "WorkdayStart", "LunchStart", "LunchEnd", "WorkdayEnd"
Format columns A:D as time (like Custom "hh:mm")
Into cell E2 enter the formula
=IF(OR(A2="";D2=""),"",(D2-A2)-(C2-B2))
or, in case workday stretches over midnight
=IF(OR(A2="",D2=""),"",(D2-A2+(D2<A2))-(C2-B2+(C2<B2)))
and copy it down



--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )



"john327" wrote in message
...
I would like to set up a table in excel that allows me to enter, for
example:
A time punched in (8:00 AM), time punched out (12:00 Noon) (for lunch) a
time
punched back in (1:00 PM), a time punched out (5:00 PM).
I would like a final cell to calculate total work hours as 8 hours
worked for the day.




Bill Kuunders

Timeclock Calculation
 
enter in E2

=24*((D2-C2)+(B2-A2))


A2 = 08:00
B2= 12:00
C2= 01:00 p.m
D2= 05:00 p.m.

--
Greetings from New Zealand
Bill K

"john327" wrote in message
...
I would like to set up a table in excel that allows me to enter, for
example:
A time punched in (8:00 AM), time punched out (12:00 Noon) (for lunch) a
time
punched back in (1:00 PM), a time punched out (5:00 PM).
I would like a final cell to calculate total work hours as 8 hours
worked for the day.




Chip Pearson

Timeclock Calculation
 
See www.cpearson.com/excel/overtime.htm for examples and a
downloadable workbook.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"john327" wrote in message
...
I would like to set up a table in excel that allows me to enter,
for example:
A time punched in (8:00 AM), time punched out (12:00 Noon) (for
lunch) a time
punched back in (1:00 PM), a time punched out (5:00 PM).
I would like a final cell to calculate total work hours as
8 hours
worked for the day.





All times are GMT +1. The time now is 12:35 PM.

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