Calculating Total Time across Multiple Periods

Shines1984

New Member
Joined
Nov 11, 2013
Messages
4
Hi All,

We have introduced a new pay scale at work and I am really struggling to calculate hours correctly. Would really appreciate some help please.

I have the following, which allows for a shift start and end, as well as 3 separate break periods. The pay is determined by the time of day the staff member is working. I need to calculate the total number of hours worked in Rate A, Rate B, Rate C, and Rate D. Breaks need to be deducted from the rate of pay that the break was taken.

Start TimeEnd TimeBreak 1 StartBreak 1 EndBreak 2 StartBreak 2 EndBreak 3 StartBreak 3 end
22:0008:0001:0001:1503:1503:3006:4506:30
Rate ARate BRate CRate D
Start06:3019:0023:0003:00
End19:0023:0003:0006:30
Hourly Rate£8.50£9.50£10.75£9.50

<colgroup><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>

<colgroup><col><col><col><col><col><col><col><col></colgroup><tbody></tbody>


Is anyone able to help please?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
I don't know if I can solve this or not, but I have a couple questions:
Are the times being added manually, or are they coming in from a punch clock, or what? Mostly wondering what format the numbers will be in (i.e. actual full excel date-and-time stamps, or just numbers typed in?
Will the time stamps be varying times, or are the shifts fixed?
Are the breaks fixed, or are they being added individually? (i.e. does everyone get 15 minutes break and have 15 minutes deducted, or do they punch out and in for break time?)
 
Upvote 0
One more/rephrase: Are the break times set --i.e. can we assume that each break will always fall into its designated rate window? Or do you need to calculate any random break time?
 
Upvote 0
One more/rephrase: Are the break times set --i.e. can we assume that each break will always fall into its designated rate window? Or do you need to calculate any random break time?

Hi Lenny,

Thanks for replying. I was able to solve this working in google sheets with some help from the google docs forum. We have the following formula:

=ARRAYFORMULA(IF(A8="",,(1/(24*60))*MMULT(TRANSPOSE(ROW(INDIRECT("A1:A"&FLOOR(60*24*((B8-A8)+N(B8<A8)))))^0),N(({TIMEVALUE((ROW(INDIRECT("A1:A"&FLOOR(60*24*((B8-A8)+N(B8<A8)))))-1)/(24*60)+A8)>=I$5:M$5}*{TIMEVALUE((ROW(INDIRECT("A1:A"&FLOOR(60*24*((B8-A8)+N(B8<A8)))))-1)/(24*60)+A8)<I$6:M$6}-{TIMEVALUE((ROW(INDIRECT("A1:A"&FLOOR(60*24*((B8-A8)+N(B8<A8)))))-1)/(24*60)+A8)>=C8}*{TIMEVALUE((ROW(INDIRECT("A1:A"&FLOOR(60*24*((B8-A8)+N(B8<A8)))))-1)/(24*60)+A8)<D8}-{TIMEVALUE((ROW(INDIRECT("A1:A"&FLOOR(60*24*((B8-A8)+N(B8<A8)))))-1)/(24*60)+A8)>=E8}*{TIMEVALUE((ROW(INDIRECT("A1:A"&FLOOR(60*24*((B8-A8)+N(B8<A8)))))-1)/(24*60)+A8)<F8}-{TIMEVALUE((ROW(INDIRECT("A1:A"&FLOOR(60*24*((B8-A8)+N(B8<A8)))))-1)/(24*60)+A8)>=G8}*{TIMEVALUE((ROW(INDIRECT("A1:A"&FLOOR(60*24*((B8-A8)+N(B8<A8)))))-1)/(24*60)+A8)<H8})>0))))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,217,410
Messages
6,136,460
Members
450,013
Latest member
k4kamal

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