+ Reply to Thread
Results 1 to 16 of 16

Automating a time sheet

  1. #1
    Registered User
    Join Date
    01-17-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    14

    Automating a time sheet

    I have a timesheet that secretaries need automated. Basically, they need the first Start time for the date in Column B compared to the time in cell D9. If that time is 15, 30, 45 or an hour later than the time in D9, then it need to be counted in the table to the left of the data. It also need to be based on the month. For example, if John Doe was 15 minutes late 3 times in December, then in the table I would need the number 3 in J18.

    I'm uploading the spreadsheet. Any ideas to help guide me or even the code to completely do what is requested would be greatly appreciated. Thanks.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    01-17-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Automating a time sheet

    I have quite a few views, but no suggestions. Anything anyone can offer would be greatly appreciated.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Automating a time sheet

    Hi nicky315

    I've looked at your attachment 3 times myself...thinking, well, I'll look again, perhaps I can make sense of it this time. Well, I can't.

    You refer to
    the time in cell D9
    but there is no Time in D9...D9 looks like this "Today : 1/11/2013".
    You refer to
    the date in Column B
    but there are no Dates in Column B...only Names
    You refer to
    then in the table I would need the number 3 in J18.
    makes no sense in terms of the Worksheet.

    Take another stab at defining the issues and INCLUDE expected output AND EXPLAIN how you got that output.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    01-17-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Automating a time sheet

    Well that could explain why I'm not getting any suggestions. haha Let me make the adjustments you pointed out and I'll update the workbook appropriately. Thanks for at least letting me know that it doesn't make any sense. :-)

  5. #5
    Registered User
    Join Date
    01-17-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    14

    Cool Re: Automating a time sheet

    Okay. That was the wrong workbook. Here is the correct one. Thanks again for pointing it out for me Jaslake.
    Attached Files Attached Files

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Automating a time sheet

    Hi nicky315

    Perhaps you can highlight (use bright colors...I'm color blind) the items that make up the November 4 items, the December 2 items and the January 3 items. Include an explanation why the other apparent include-able items didn't make the cut.

  7. #7
    Registered User
    Join Date
    01-17-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Automating a time sheet

    Okay. I've highlighted the rows that were used. I hope that you are able to see them. I wasn't sure what kind of color-blindness you have, but I can change the colors if needed. Basically the reason these rows are counted and not the others is due to the dates. If you look at each date, there are two entries. The reason for that, the staff have to enter their start time and then their start time after lunch. The second entry is the lunch entry. The Office Managers are only interested in the first start time for the date. For example, for 11/12/2012 they are only interested in the first entry which is 8:30. The second entry is when John Doe returned from lunch at 2:00.

    Basically, if there are multiple entries for the date, we only need the first entry. Then I need the time from the first entry compared to the start time in D9. If the time is 15, 30, 45 or 60+ minutes past the start time, then it needs to be counted in the correct cell in the table to the right.
    Attached Files Attached Files

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Automating a time sheet

    Hi nicky315

    Using this as the Rule
    if there are multiple entries for the date, we only need the first entry
    I count (manually) a total of 5 incidents for November, 18 incidents for December and 8 incidents for January. So I have to believe we're missing some Rules...what are they?
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-17-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Automating a time sheet

    Actually your manual count is correct. So, based on that one rule, the true counts would be November = 5, December = 18, and January = 8. I apologize for that confusion.

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Automating a time sheet

    Hi nicky315

    I'll take a look at this BASED ON THE ONE RULE...if you have more...best make us aware of that now.

    I'm curious...how is it that an employee can only be late in exact increments of 15 minutes?

  11. #11
    Registered User
    Join Date
    01-17-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Automating a time sheet

    They have to put their time into an application that rounds up to the nearest 15. So, they are allowed the first 15 minutes as free. After that, they are considered late. Unfortunately, that application doesn't have any reporting capabilities and the firm doesn't have in-house developers of any kind. So, when they extract the data this is the result that's in the spreadsheet.

    But, there aren't any other rules. Thanks for helping on this.

  12. #12
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Automating a time sheet

    Hi nicky315

    Wow...not like when I was a kid...when you were late, you were late...didn't get paid for it...

  13. #13
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Automating a time sheet

    Hi nicky315

    See if this Code in the attached even approaches what you're trying to do...
    Please Login or Register  to view this content.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    01-17-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Automating a time sheet

    Sorry it has taken so long to get back to you. I am finally back down to Earth. Yes, that is exactly what I need it to do. It counted them perfectly and placed them in the correct cells in the table.

  15. #15
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Automating a time sheet

    Hi nicky315

    Good...glad I could help.

    If this resolves your issue please mark your Thread as SOLVED.

    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:
    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  16. #16
    Registered User
    Join Date
    01-17-2013
    Location
    Virginia
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Automating a time sheet

    Sorry it took so long to get back. We've been working on this project and your code helped get us over the hump! Thanks a bunch! It also helped with a few other items that has us stymied! You guys ROCK!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1