SOLVED

How to Calculate Total Hours Worked

Copper Contributor

I want to create a spreadsheet where my staff enters the time they worked on individual tasks (note: I don't need start and end time, just total time on each task) and keep a running total of hours worked for that day, then get a total for the entire week.  I've tinkered around with the formulas but can't seem to get it to work correctly. 

 

Can one of you Excel geniuses help me out?? 

Thanks in advance!!! 

3 Replies

@danazee 

I want to create a spreadsheet where my staff enters the time they worked ...<snip> and keep a running total of hours worked for that day, then get a total for the entire week.  I've tinkered around with the formulas but can't seem to get it to work correctly. 

Presumably you've also included a set of hypothetical records of hours worked on different projects in order to do your tinkering with formulas. Since the specific formula(s) that could work would depend in great measure on how the underlying data are arrayed, you could help us help you if you were to post a copy of what you do have on OneDrive or GoogleDrive, with a link pasted here that grants us edit access to that workbook. (Otherwise you're asking us to start from scratch, create the records and the formulas, in which case the formulas might not fit your data.

best response confirmed by mathetes (Silver Contributor)
Solution

@danazee 

Attached is one example of how that might be accomplished. The SUMIFS function is the workhorse here.  I'll assume that your version of Excel supports it. The function supports two or more selection criteria per usage; I needed only two criteria in each usage here.

 

The Log1 worksheet is the log of employee work. The Summary1 worksheet is what a manager might more likely view. I used the custom format [h]:mm;@ for elapsed times and total times, assuming that you are not measuring those values to the second.

 

Fancier formulas could accomplish this without the need to reserve a column for the Week. But the Week column does not need to be visible for this to work.

 

I added conditional formatting to highlight the switch between consecutive days. Multiple formatting rules could instead be used to assign specific colors to different days of the week.

 

This implementation does not use an Excel table, which might be a good alternative, particularly if you're going to keep a very long log of employee work (before switching to another worksheet or workbook).

Hey @SnowMan55 Wow! There is no way in hell I would have figured that out! Thank you so much for your help! You saved me a lot of time and frustration! Greatly appreciated!
1 best response

Accepted Solutions
best response confirmed by mathetes (Silver Contributor)
Solution

@danazee 

Attached is one example of how that might be accomplished. The SUMIFS function is the workhorse here.  I'll assume that your version of Excel supports it. The function supports two or more selection criteria per usage; I needed only two criteria in each usage here.

 

The Log1 worksheet is the log of employee work. The Summary1 worksheet is what a manager might more likely view. I used the custom format [h]:mm;@ for elapsed times and total times, assuming that you are not measuring those values to the second.

 

Fancier formulas could accomplish this without the need to reserve a column for the Week. But the Week column does not need to be visible for this to work.

 

I added conditional formatting to highlight the switch between consecutive days. Multiple formatting rules could instead be used to assign specific colors to different days of the week.

 

This implementation does not use an Excel table, which might be a good alternative, particularly if you're going to keep a very long log of employee work (before switching to another worksheet or workbook).

View solution in original post