Formula for deciding shift differential based on a start time

Jasonpen

New Member
Joined
Nov 18, 2018
Messages
3
Hi i'm trying to figure out how to write a formula that would look at a shift start time and based on that time would output the correct shift premium to the cell. So I have 3 scenarios a start time from 05:00 to 13:59 no premium. 14:00 to 21:59 .75 cents per hour and lastly 22:00 to 04:59 $1.00 per hour. I've tried using an if and statement and I can make it work for one of the start times but am unsure of the syntax to get it to analyze everything or if that is just not the correct way to do what i'm looking to accomplish. Any help would be appreciated thanks.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi Jason,

If you can post some sample data we can check it out.

Ras
 
Upvote 0
=IF(AND(H3>=TIME(14,0,0),H3<=TIME(21,59,0)),"$0.75","$0.00")
This is the formula I used but I don't know how to do more comparisons. The data is just entering the start time in one cell in 24:00 time format. Just need a way for it to know what time slot the start time fell into so it can assign the correct shift premium.
 
Upvote 0
Try,

=IF(AND(H1>=TIME(14,0,0),H1<=TIME(21,59,0)),0.75,IF(AND(H1>=TIME(22,0,0),H1<=1.207638889),1,0))
 
Upvote 0
Thanks for your help. That formula didn't work quite right but I found some other info and I got one that works exactly like I want. =IF(AND(H3>=TIME(5,0,0),H3<=TIME(13,59,0)),"$0.00",(IF(AND(H3>=TIME(14,0,0),H3<=TIME(21,59,0)),"$0.75","$1.00")))
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,490
Members
448,967
Latest member
visheshkotha

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