Hi there. I've just joined the forum as I'm driving my self dizzy trying to work out the solution to my problem. I'm sure it's an easy solution but I need the help of Excel experts to find it!
I've created a spreadsheet version of the timesheet used within my organisation. There is no fixed shift pattern, so the sheet needs to calculate hours worked between two hours entered into the relevant cells in columns B ('From') and D ('To') respectively. The total hours worked is calculated in column F. My formulas perhaps aren't the best, but his bit all works ok for me.
Unsocial hours are classed as any time worked before 8:00am or after 8:00pm, Monday to Friday, and all hours worked on Saturday and/or Sunday.
Columns C and E are hidden in the working spreadsheet but I've unhidden them so you can see my formulas.
Column C calculates the unsocial hours worked before 8:00AM, and that works ok as can be seen for the example entry for Monday.
Column E is supposed to calculate the hours worked after 8:00PM, but this is where the problem lies. If for example the start time is 9:30PM and the finish time is 10:30PM (1 hour worked), my formula calculates the unsocial hours as 2.5 hours (ie. the difference between the trigger time for u/s hours - 8:00PM, and the finish time).
As I said, I'm sure the solution is an easy one, and probably staring me in the face. Hoping one of the experts here can help.
Cheers
Bookmarks