Pay rates depending on time

Dobey

New Member
Joined
Apr 21, 2018
Messages
3
Hi all, I am trying to calculate shift rates depending on times. I have the following shift rates, but I cannot seem to get the results returned I'm looking for due to the times of some shifts going past midnight.

As an example a shift might be 15:30 - 01:30.

START BETWEEN
EARLY MORNING04:0005:30
STARTS BEFOREENDS AFTER
AFTERNOON18:0018:30
START BETWEEN
NIGHT18:003:59

<colgroup><col width="145" span="5" style="width:109pt"> </colgroup><tbody>
</tbody>

Any help would be greatly appreciated.

Regards
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I can't determine how to distinguish between "afternoon" and "night". You can determine the hours worked with a formula that's not complex.

ABC
1StartEndHrsWorked
204:1512:4508:30
318:3023:5905:29
418:3000:0105:31

<tbody>
</tbody>

Either of these two formulas, in C2 and copied downward, will work:

=IF(A2>B2, 1, 0) + B2 - A2

or

=(A2>B2) + B2 - A2
 
Upvote 0
I can't determine how to distinguish between "afternoon" and "night". You can determine the hours worked with a formula that's not complex.

ABC
1StartEndHrsWorked
204:1512:4508:30
318:3023:5905:29
418:3000:0105:31

<tbody>
</tbody>

Either of these two formulas, in C2 and copied downward, will work:

=IF(A2>B2, 1, 0) + B2 - A2

or

=(A2>B2) + B2 - A2

Hours worked I have, I need to know “what shift it is” to determine shift rates. Can this be done without dates?

difference between afternoon and night
afternoon has to start before 18:00 but finish has to be after 18:30
night has to starts anytime between 18:30 and 03:59
 
Upvote 0
Please don't hit the "Reply With Quote". It makes the thread unnecessarily long and difficult to scroll.

You keep writing "between"—what do you want to do when the clock-in time is exactly 18:00 or between 18:00 and 18:29:59?

Here's what I have:

A
BC
1
StartEndShift
203:5912:01Night
304:0011:00Morning
404:0112:45Morning
517:5923:59Afternoon
617:5900:01Afternoon
718:0000:01UNKNOWN
818:0100:01UNKNOWN
918:2900:01UNKNOWN
1018:3023:59UNKNOWN
1118:3100:01Night

<tbody>
</tbody>

In C2:

=IF(AND(HOUR(A2)>=4, A2<=TIME(5, 30, 0)), "Morning",
IF(AND(HOUR(A2)< 18, B2+(A2>B2)>TIME(18, 30, 0)), "Afternoon",
IF(OR(A2>TIME(18, 30, 0), HOUR(A2)< 4), "Night", "UNKNOWN")))
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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