When creating a timesheet in Excel you may need to calculate different rates of pay. This could be because of overtime, or the type of work being done.
In this tutorial, we create a timesheet that uses different rates of pay for working weekends, and also night shifts.
Calculating Hours Worked
In this timesheet, the day and night shifts are entered on separate rows. This will make it easier for our calculations. A column (column E) is also used to record whether it is a day or night shift.

Our first task is to calculate the number of hours worked on the shift. To do this the following formula can be used. This formula finds the difference between the two times as a decimal, and then multiplies by 24 to convert it to hours.
(D5-B5)*24
If the shift is worked overnight, so you started work on one day but finished the next, then the formula below is used.
(1+D5-B5)*24
Now in this timesheet it is not quite that straight forward. We need to test first what shift they are doing and whether it was worked overnight or not, so that the correct formula can be run.
The formula below is entered into column F to calculate hours worked on the day shift.
=IF(E5="Day",(D5-B5)*24,0)
In column G, the formula below was used to calculate hours worked on the night shift. The IF function first tests if it was a night shift, then test to see if it was worked overnight (A5<C5), and runs the correct calculation as a result.
=IF(E5="Night",IF(A5<C5,(1+D5-B5)*24,(D5-B5)*24),0)[Read more…] about Excel Timesheet with Different Rates for Shift Work



