Formula to Calc Hrs Worked

jschlapi

New Member
Joined
Aug 8, 2008
Messages
49
Hello,
I wonder if I could once again ask for advice. I'm looking for a formula to calculate hours worked per shift based on IN / OUT time. My REGULAR SHIFT runs from 7:00 a.m. to 3:30 p.m. - all other hours are grouped into the OVERTIME column.

EXAMPLES:
A B C D E F
Time In Time Out Reg hrs OT Hrs Reg $ OT $
7:00 AM 11:00 AM 3 0 $30.00 $0.00
12:00 PM 6:30 PM 3.5 3 $35.00 $45.00
11:00 PM 3:15 AM 0 4.25 $0.00 $63.75

thank you for your help.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Not sure if you realised you posted this in the 'Test Here' forum? If it is a real question rather than a test post, reply here and somebody will move the thread to the 'Excel Questions' forum.
 
Upvote 0
Hello,
I wonder if I could once again ask for advice. I'm looking for a formula to calculate hours worked per shift based on IN / OUT time. My REGULAR SHIFT runs from 7:00 a.m. to 3:30 p.m. - all other hours are grouped into the OVERTIME column.

EXAMPLES:
A B C D E F
Time In Time Out Reg hrs OT Hrs Reg $ OT $
7:00 AM 11:00 AM 3 0 $30.00 $0.00
12:00 PM 6:30 PM 3.5 3 $35.00 $45.00
11:00 PM 3:15 AM 0 4.25 $0.00 $63.75

thank you for your help.
Try this...

Not extensively tested but for what I did test it seems to work.

Book1
ABCD
1InOutRegOT
27:00 AM11:00 AM4:000:00
37:15 AM7:30 AM0:150:00
411:00 PM11:00 AM4:008:00
Sheet1

Enter this formula in C2:

=(A2>B2)*MEDIAN(0,B2-7/24,8.5/24)+MAX(0,MIN(15.5/24,B2+(A2>B2))-MAX(7/24,A2))

Format as h:mm

Enter this formula in D2:

=MOD(B2-A2,1)-C2

Format as h:mm

Select C2:D2 and copy down as needed.
 
Upvote 0
This is perfect, except it will not allow me to multiply the hours worked by rate of pay. Example: I would like: 4 hrs * $10 = $40.

any ideas?

Thank you,
 
Upvote 0
This is perfect, except it will not allow me to multiply the hours worked by rate of pay. Example: I would like: 4 hrs * $10 = $40.

any ideas?

Thank you,
It would be:

Hours * 24 * Rate

=C2*24*10

Or, if you put the rate in a cell:

C2 = 4:00
E1 = 10

=C2*24*E1

Format as General or Number
 
Upvote 0
I'm Back......I wondered if there is a way to accommodate weekends. Weekends (day 7 and day 1) hours should go directly into the Overtime Hours column.

I think it should be some sort of IF statement, but not sure.....

Thank you.
 
Upvote 0

Forum statistics

Threads
1,214,849
Messages
6,121,925
Members
449,056
Latest member
denissimo

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