Rate of pay calculation

Ntisch

Board Regular
Joined
Aug 16, 2003
Messages
60
Hope someone can assist.

Looking for a formula that will calculate a different rate of pay based on time employee starts and finishes work.

Two time rates of pay;

8am/8pm - rate of pay 1
8pm/8am - rate of pay 2

Effectively I just need a formula to look at times in the START and END columns and calculate the appropriate formulas in the RATE 1 and RATE 2 columns.

The start and end columns are coded in the time format.

Thanks in advance.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
<br /><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th><th>G</th><th>H</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="font-weight: bold;text-align: center;;">Start</td><td style="font-weight: bold;text-align: center;;">End</td><td style="font-weight: bold;text-align: center;;">Hrs  @Rate1</td><td style="font-weight: bold;text-align: center;;">Hrs  @Rate2</td><td style="text-align: center;;"></td><td style="font-weight: bold;text-align: center;;">Rates Range</td><td style="font-weight: bold;text-align: center;;">Start</td><td style="font-weight: bold;text-align: center;;">End</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="text-align: center;;">3:30 PM</td><td style="text-align: center;;">11:00 PM</td><td style="text-align: center;;">4.5</td><td style="text-align: center;;">3</td><td style="text-align: center;;"></td><td style="text-align: center;;">Rate1</td><td style="text-align: center;;">8:00 AM</td><td style="text-align: center;;">8:00 PM</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style="text-align: center;;">4:00 PM</td><td style="text-align: center;;">12:00 AM</td><td style="text-align: center;;">4</td><td style="text-align: center;;">4</td><td style="text-align: center;;"></td><td style="text-align: center;;">Rate2</td><td style="text-align: center;;">8:00 PM</td><td style="text-align: center;;">8:00 AM</td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style="text-align: center;;">5:00 PM</td><td style="text-align: center;;">1:00 AM</td><td style="text-align: center;;">3</td><td style="text-align: center;;">5</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style="text-align: center;;">6:00 PM</td><td style="text-align: center;;">2:00 AM</td><td style="text-align: center;;">2</td><td style="text-align: center;;">6</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style="text-align: center;;">7:00 PM</td><td style="text-align: center;;">3:00 AM</td><td style="text-align: center;;">1</td><td style="text-align: center;;">7</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">7</td><td style="text-align: center;;">8:00 PM</td><td style="text-align: center;;">4:00 AM</td><td style="text-align: center;;">0</td><td style="text-align: center;;">8</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">8</td><td style="text-align: center;;">9:00 PM</td><td style="text-align: center;;">5:00 AM</td><td style="text-align: center;;">0</td><td style="text-align: center;;">8</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">9</td><td style="text-align: center;;">10:00 PM</td><td style="text-align: center;;">6:00 AM</td><td style="text-align: center;;">0</td><td style="text-align: center;;">8</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">10</td><td style="text-align: center;;">11:00 PM</td><td style="text-align: center;;">7:00 AM</td><td style="text-align: center;;">0</td><td style="text-align: center;;">8</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">11</td><td style="text-align: center;;">12:00 AM</td><td style="text-align: center;;">8:00 AM</td><td style="text-align: center;;">0</td><td style="text-align: center;;">8</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">12</td><td style="text-align: center;;">1:00 AM</td><td style="text-align: center;;">9:00 AM</td><td style="text-align: center;;">1</td><td style="text-align: center;;">7</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">13</td><td style="text-align: center;;">2:00 AM</td><td style="text-align: center;;">10:00 AM</td><td style="text-align: center;;">2</td><td style="text-align: center;;">6</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">14</td><td style="text-align: center;;">3:00 AM</td><td style="text-align: center;;">11:00 AM</td><td style="text-align: center;;">3</td><td style="text-align: center;;">5</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">15</td><td style="text-align: center;;">4:00 AM</td><td style="text-align: center;;">12:00 PM</td><td style="text-align: center;;">4</td><td style="text-align: center;;">4</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">16</td><td style="text-align: center;;">5:00 AM</td><td style="text-align: center;;">1:00 PM</td><td style="text-align: center;;">5</td><td style="text-align: center;;">3</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">17</td><td style="text-align: center;;">6:00 AM</td><td style="text-align: center;;">2:00 PM</td><td style="text-align: center;;">6</td><td style="text-align: center;;">2</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">18</td><td style="text-align: center;;">7:00 AM</td><td style="text-align: center;;">3:00 PM</td><td style="text-align: center;;">7</td><td style="text-align: center;;">1</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">19</td><td style="text-align: center;;">8:00 AM</td><td style="text-align: center;;">4:00 PM</td><td style="text-align: center;;">8</td><td style="text-align: center;;">0</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">20</td><td style="text-align: center;;">9:00 AM</td><td style="text-align: center;;">5:00 PM</td><td style="text-align: center;;">8</td><td style="text-align: center;;">0</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">21</td><td style="text-align: center;;">10:00 AM</td><td style="text-align: center;;">6:00 PM</td><td style="text-align: center;;">8</td><td style="text-align: center;;">0</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">22</td><td style="text-align: center;;">11:00 AM</td><td style="text-align: center;;">7:00 PM</td><td style="text-align: center;;">8</td><td style="text-align: center;;">0</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">23</td><td style="text-align: center;;">12:00 PM</td><td style="text-align: center;;">8:00 PM</td><td style="text-align: center;;">8</td><td style="text-align: center;;">0</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">24</td><td style="text-align: center;;">1:00 PM</td><td style="text-align: center;;">9:00 PM</td><td style="text-align: center;;">7</td><td style="text-align: center;;">1</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr><tr ><td style="color: #161120;text-align: center;">25</td><td style="text-align: center;;">2:00 PM</td><td style="text-align: center;;">10:00 PM</td><td style="text-align: center;;">6</td><td style="text-align: center;;">2</td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td><td style="text-align: center;;"></td></tr></tbody></table><br /><br /><table cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C2</th><td style="text-align:left">=IF(<font color="Blue">OR(<font color="Red">A2="",B2=""</font>),"",OR(<font color="Red">A2<Rate1End, B2>Rate1Start</font>)*(<font color="Red">MIN(<font color="Green">Rate1End,B2+(<font color="Purple">B2<A2</font>)</font>)-MAX(<font color="Green">Rate1Start,A2</font>)</font>)*24</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D2</th><td style="text-align:left">=IF(<font color="Blue">C2="","",(<font color="Red">B2+(<font color="Green">B2<A2</font>)-A2</font>)*24-C2</font>)</td></tr></tbody></table></td></tr></table><br /><table cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Workbook Defined Names</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Name</th><th style="text-align:left">Refers To</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">Rate1End</th><td style="text-align:left">=Sheet1!$H$2</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">Rate1Start</th><td style="text-align:left">=Sheet1!$G$2</td></tr></tbody></table></td></tr></table><br />
Copy the C2 and D2 formulas down each column. Format the cells with the formulas as general. Excel may try to automatically format the formula cells with a time format.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

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