I need to figure time employees worked for payroll.

Doug Crumley

New Member
Joined
Feb 11, 2003
Messages
20
I used the formulas listed under time and date to no avail. Here is an example:
A D E
In Out Total Hrs
7:30 11:00
12:00 5:00 8.5 is the correct but I get anything but that. Please help. Thanks
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Doug,
I have been using this for a while for calculating hours of overtime on timesheets.On mine I have column "A" as day;"B" as Month;"C" Time From" and "D" as "To: Column "E" is the formula column. It doesn't matter what you put in for day and month as they are not calculated.(My sheets are monthly" The formula in Column "E" is:
=IF(D4="","",(24*(IF(D4<C4,D4+1-C4,D4-C4)))

The first If is use to keep the cell blank.
This uses the 24 hour clock, and works when you change days as well, example, from 21:eek:o hours to 03:00 hours.
Columns D & E are formatted "Time", but Column "E" is formatted "General", because I want the overtime hours to be in decimal, example: I want 2.5hours overtime, not 2:30.

Hope this helps. If you would like a copy of a working sheet, drop me an e-mail.

ehs
This message was edited by ehs on 2003-02-22 21:41
This message was edited by ehs on 2003-02-22 21:43
 
Upvote 0
Sorry Doug,
I couldn't get the formula to view on the last response. Try again:
=IF(D4="","",(24*(IF(D4<C4,D4+1-C4,D4-C4))))

ehs
This message was edited by ehs on 2003-02-22 21:47
 
Upvote 0
Taking ehs's formula and adapting it for a double sign-in, sign-out (unpaid meal break). Assumes in-out-in-out are in cells C12:F12.

=IF(D12="","",(24*(IF(D12"<"C12,D12+1-C12,D12-C12))))+IF(F12="","",(24*(IF(F12"<"E12,F12+1-E12,F12-E12))))
This message was edited by Barry Katcher on 2003-02-22 22:33
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,390
Members
448,957
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top