A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hello,
for the weekly actual totals you could use a SUM() function that sums up the cells for the daily totals.
For the total hours that SHOULD be worked, how will Excel know that a day is a holiday? Holidays need to be marked in your table by something that can be recognized in a formula, i.e. NOT colour or bold font. You may need to add another column for "is holiday?" and put in a "y" for holidays, leave blank for regular days.
| Date | Day | is holiday? | In | out | breake out | break in | Total hours that should be worked | Total worked hours per day | Total worked hours per week |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Mon. | y | |||||||
| 2 | Tue. | 09:30 | 15:00 | 10:00 | 10:30 | 5 | |||
| 3 | Wed. | 10:00 | 14:00 | 4 | |||||
| 4 | Thu. | 10:00 | 17:00 | 13:00 | 13:15 | 6.75 | |||
| 5 | Fri. | 12:00 | 15:00 | 3 | |||||
| 6 | Sat. | ||||||||
| 7 | Sun. | 20 | 18.75 | ||||||
| 8 | Mon. | 09:30 | 15:00 | 10:00 | 10:30 | 5 | |||
| 9 | Tue. | 10:00 | 14:00 | 4 | |||||
| 10 | Wed. | 10:00 | 17:00 | 13:00 | 13:15 | 6.75 | |||
| 11 | Thu. | 12:00 | 15:00 | 3 | |||||
| 12 | Fri. | 12:00 | 15:00 | 3 | |||||
| 13 | Sat. | ||||||||
| 14 | Sun. | 25 | 21.75 | ||||||
| until the end of the month... |
The formula in the "Should be worked" column is
=IF(B8="Sun.",SUMPRODUCT((C2:C6<>"y")*5),"")
Adjust to suit your cell addresses.
The formula for the weekly total is
=IF(B8="Sun.",SUM(I2:I8),"")
Start both formulas in the row of the first Sunday and then copy down. You will always need seven data rows above the formula, otherwise you'll get errors, so when you start a new month, you may need to keep the last few days of the previous month, so the table always starts on a Monday.