"I currently have a 4 line entry for a timesheet, where employees enter arrival times and departures 2x a day to calculate work hours. I am changing this to a 3 line entry, where employees enter arrival and departure, then enter the time taken for a meal break. I consider this much simpler for the employees. I currently have this for a 4 line entry: =SUM(D15-D14+D18-D17), and this gives me the total hours worked. I attempted this formula for a 3 line entry, which does not work: =SUM(D12-D11)*24-SUM(D13/24)
Question is: What formula can I use to add up the hours, then subtract the time taken for meals? I can email the WS if you prefer." Answer from Richard Rost:
Well, I have this tutorial that talks about calculating the differences between two times:
I would just do this in three separate columns. You'll end up with three values, representing the total hours worked (1, 2) and the time taken for meals (3). All you have to do now is add together 1 and 2 and then subtract 3 in another column.
It's always EASIER to try and break up complex problems into multiple columns like this than to cram it all into one big formula.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Excel Forum.