Lesson 24. Project: tracking hours worked
Use lesson24.xlsx completed as in the lesson, and before each exercise put the original data back.
Files: lesson24.xlsx · solutions: lesson24-solutions.xlsx.
In the exercises with a sheet, type the formula in the fx bar and click Check: the sheet works it out the way Excel does, with commas between the arguments (semicolons work too), and also tries it with other data, to see whether it still works when the data changes. In the other exercises, you work in Excel with the lesson's file and type the result here.
At the end of the page you'll find the lesson's Bonus challenge: one more exercise, whose answer isn't in the book. You check it only here.
Exercise 1
Show the answer
For example, with the start in J4, the end in K4 and the break in L4: =ROUND((MOD(K4-J4,1)-L4)*24,2) = 7.25 hours (7:45 minus 30 minutes = 7:15).
Exercise 2
Show the answer
=COUNTIF(Shifts[Employee],"Marcus Reed") = 21 shifts.
Exercise 3
Show the answer
Hours in the month 164.50, overtime 4.50, regular hours 160.00. 160 × $18.00 = $2,880.00; 4.50 × $18.00 × 1.5 = $121.50; in total $3,001.50.
Exercise 4
Show the answer
Priya's week 48: from 46:00 to 40:00 hours (40.00 as a decimal), overtime 0.00: the cell is no longer red, because 0 isn't greater than 0.
Exercise 5
=[@End]-[@Start] work for it?Show the answer
In week 48, the week of Sunday, November 29, the day it starts. =[@End]-[@Start] gives 7:00 AM minus 10:00 PM, a negative number, and Excel shows #####: you need MOD(...,1).
Bonus challenge
The answer isn't in the book: you check it only here.
Show the answer
=SUM(Shifts[Hours]) with the format [h]:mm shows 444:30, that is 444.50 decimal hours: 164.50 hours for Emily, 168.00 for Marcus and 112.00 for Priya. With the format h:mm, the same cell shows 12:30, because the hours start again from zero every 24 hours. With the General format, you see the number of days, a little more than 18. To fix the format: Ctrl+1, Custom category, type [h]:mm in the Type box and click OK. You can also add up the Decimal column, =SUM(Shifts[Decimal]), which gives 444.5 right away.