Feb 19 2023 06:22 AM
Hi Folks, new to this forum so please be gentle 🙂
I have 8 employees who use a mS Form I have created to input their weekly timesheet. At the end of the week, I save the results to an excel file. All the entries are in random order and each employee can have various amounts of entries. I use a macro to sort the entries into day order (Monday, Tuesday, etc.) and the sort them into employee order alphabetically. They input hours for each entry and I can total the hours for the whole sheet. This works reasonably well and it produces a PDF that we save for each week. What I would like to do, is be able to insert a row after each employee and total their individual hours for the week within that row. Any help with how to do this would be appreciated.
Feb 19 2023 06:40 AM
Could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?
Feb 19 2023 10:11 AM - edited Feb 19 2023 10:14 AM
@HansVogelaar Please see above. This is what I get from the form after I remove the columns I dont need and sort the order of the day of the week and then the employees. The number of rows can vary from week to week. What I am looking for is a way to add up the hours of each employees. Ideally I would insert a row between each employee the total the hours for each employee. It needs to be done in a macro. TIA.
Feb 19 2023 11:48 AM
What do you mean by "Please see above"?
Feb 19 2023 04:22 PM
Sorry @HansVogelaar I thought I had attached a screenshot. I will try again tomorrow when I have more time.
Feb 20 2023 04:44 AM
Feb 20 2023 05:16 AM
SolutionYou can use Excel's Subtotal feature.
Click anywhere in the data.
Activate the Data tab of the ribbon and click Subtotal in the Outline group:
The Subtotal should propose to add a subtotal for each change in the NAME column, and add it to the HOURS column:
Click OK. Result (with some random dummy data):
Feb 20 2023 06:02 AM - edited Feb 20 2023 07:53 AM
Many thanks @HansVogelaar. That has worked perfectly. I had a few issues as the SubTotal option was grayed out, but found a solution on the web. Thanks again for your help.
Feb 20 2023 06:40 AM
Select the HOURS column.
On the Data tab of the ribbon, click Text to Columns, then click Finish without changing any settings.
Does that make Subtotal available?
Feb 20 2023 08:47 AM
Jun 26 2023 12:49 PM
i am trying to create an MS forms timesheet template for my employees with the ability to export to excel however I’m struggling to even get the form off the ground, is there any chance you have a template you have created that you could share? It would be really appreciated!
Thanks
Matty
Jun 29 2023 08:34 AM
Feb 20 2023 05:16 AM
SolutionYou can use Excel's Subtotal feature.
Click anywhere in the data.
Activate the Data tab of the ribbon and click Subtotal in the Outline group:
The Subtotal should propose to add a subtotal for each change in the NAME column, and add it to the HOURS column:
Click OK. Result (with some random dummy data):