+ Reply to Thread
Results 1 to 29 of 29

Employee breakdown by half hour on rotating 6 week schedule

  1. #1
    Registered User
    Join Date
    09-28-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    32

    Employee breakdown by half hour on rotating 6 week schedule

    Good Afternoon,

    This is a bit of a long request for help, but I will try my best to include all information. I have a 6 week work schedule for 350 people. It rotates every 6 weeks because each person has a (1) scheduled training day in those 6 weeks. What I am trying to compile would be a daily wrap up of how many people are on shift (not including people in training or of course on days off), by half hour, and then do that for each day of the rotation. Attached is the information that I have to work with. I have flirted around with IF, AND, and SUMIF statements, but I think this one will be a lot more complex than just those. As always, I will help to answer any question that you may have.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Employee breakdown by half hour on rotating 6 week schedule

    is this what you want? or at least in the right track?
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-28-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Employee breakdown by half hour on rotating 6 week schedule

    Headed in the right direction, but not quite what I'm looking for. I need not just how many are scheduled for that day, but a breakdown of how many people are on duty for each half hour. In the example shown, that would be from 0400 to 1200 by half hour increments.

  4. #4
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Employee breakdown by half hour on rotating 6 week schedule

    I wrote a macro and added the half hours labels down the sheet.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-28-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Employee breakdown by half hour on rotating 6 week schedule

    That looks great. The only thing I failed to provide in the original post is to have it also broken down by location. So you would have each location broken down by half hour with the amount of available employees. Other than that, rcm, you are right on track. Thanks.

  6. #6
    Registered User
    Join Date
    09-28-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Employee breakdown by half hour on rotating 6 week schedule

    The top of each hour in the breakdown section only shows 1 and not the true number of employees on shift. Is that just an adjustment in the VBA?

  7. #7
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Employee breakdown by half hour on rotating 6 week schedule

    Give it a run

    1. I added the location so there are half hour intervals by location.
    2. The counting is done by the starting time of the interval.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    09-28-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    32
    Quote Originally Posted by rcm View Post
    Give it a run

    1. I added the location so there are half hour intervals by location.
    2. The counting is done by the starting time of the interval.

    I have stumbled across a few shifts that start at 45 after and end at 15 after. Is there anyway to build in to the code to have those shifts rounded up 15 minutes so that they fall into a 30 minute increment? Other than that, i believe it is exactly what I'm looking for.

  9. #9
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Employee breakdown by half hour on rotating 6 week schedule

    Dear aferguson:

    let me try to understand the rounding procedure so it can be programmed...

    0445 -> 0500 ?
    1215 -> 1230?

    so

    ..45 should be added 15 minutes to the next hour
    ..15 should be added 15 minutes to the next half hour

  10. #10
    Registered User
    Join Date
    09-28-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    32
    Quote Originally Posted by rcm View Post
    Dear aferguson:

    let me try to understand the rounding procedure so it can be programmed...

    0445 -> 0500 ?
    1215 -> 1230?

    so

    ..45 should be added 15 minutes to the next hour
    ..15 should be added 15 minutes to the next half hour
    Yes, that would be correct.

  11. #11
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Employee breakdown by half hour on rotating 6 week schedule

    I added some code to handdle the 15 minutes adjustments. I changed the input and highlighted the changes to test the code.
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    09-28-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    32
    Quote Originally Posted by rcm View Post
    I added some code to handdle the 15 minutes adjustments. I changed the input and highlighted the changes to test the code.
    So i actually now need any start time that is 15 or 45 to round up, while any end time that is 15 or 45 to round down. I've looked at the vba but can't seem to adjust it properly.

  13. #13
    Registered User
    Join Date
    09-28-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Employee breakdown by half hour on rotating 6 week schedule

    And also, I've noticed that it counts someone as being on shift at their end time. Example, if they get off at 1230, it's showing 1 when it should show 0.

  14. #14
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Employee breakdown by half hour on rotating 6 week schedule

    I am sending the macro with the changes highlighted for you to change them

    Now, if the ending time is 15 it rounds it off to the hour
    if the ending time is 45 it rounds it off to the half hour (30)

    in the second modification the counting loop stops short of the ending hour

    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    09-28-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    32
    Quote Originally Posted by rcm View Post
    I am sending the macro with the changes highlighted for you to change them

    Now, if the ending time is 15 it rounds it off to the hour
    if the ending time is 45 it rounds it off to the half hour (30)

    in the second modification the counting loop stops short of the ending hour

    Please Login or Register  to view this content.
    So i made the changes, but look at the attached and see how it handles the highlighted shift. It just fully ignore the shift.
    Attached Files Attached Files

  16. #16
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Employee breakdown by half hour on rotating 6 week schedule

    you are right, since I copied from the previous block (the h1t) I did not change some of the h1t references, here is the correct code
    Please Login or Register  to view this content.

  17. #17
    Registered User
    Join Date
    09-28-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Employee breakdown by half hour on rotating 6 week schedule

    What would I need to change in the code to have my master schedule on sheet 1 and the half hour breakdown to compile on sheet 2 starting in cell A5?

  18. #18
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Employee breakdown by half hour on rotating 6 week schedule

    I thought you never asked!
    Please Login or Register  to view this content.

  19. #19
    Registered User
    Join Date
    09-28-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: Employee breakdown by half hour on rotating 6 week schedule

    You rock, rcm. I will mess around with it tomorrow, so stand by to possibly answer a few more noob questions.

  20. #20
    Registered User
    Join Date
    09-28-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    32
    Quote Originally Posted by aferguson View Post
    You rock, rcm. I will mess around with it tomorrow, so stand by to possibly answer a few more noob questions.
    What if on the sheet 2 i want a cell that i enter the date that i want the code to run for? So if i want to make adjustments in the schedule for one date, i can just update that specific date. Does that make sense?

  21. #21
    Registered User
    Join Date
    09-28-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    32
    Quote Originally Posted by rcm View Post
    I thought you never asked!
    Please Login or Register  to view this content.
    What if on the sheet 2 i want a cell that i enter the date that i want the code to run for? So if i want to make adjustments in the schedule for one date, i can just update that specific date. Does that make sense?

  22. #22
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Employee breakdown by half hour on rotating 6 week schedule

    I set the range of dates
    Intial date A1,
    Ending date B1, (if b1 is left blank then Ending date=a1)
    if both cells are blank it assumes the entire column range (8 thru 49)

    Please Login or Register  to view this content.
    Last edited by rcm; 05-29-2016 at 06:22 PM.

  23. #23
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Employee breakdown by half hour on rotating 6 week schedule

    I just realize that there is a lot more adjusting needed wait a while. It dawn on me that the table below has to be adjusted so after the first run, any changes in the schedules has to be monitored to keep it updated.

  24. #24
    Registered User
    Join Date
    09-28-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    32
    Quote Originally Posted by rcm View Post
    I just realize that there is a lot more adjusting needed wait a while. It dawn on me that the table below has to be adjusted so after the first run, any changes in the schedules has to be monitored to keep it updated.
    So it could be done? But more adjustments would have to be made than in your last edit?

  25. #25
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Employee breakdown by half hour on rotating 6 week schedule

    yes it can be done. I see to it.

  26. #26
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Employee breakdown by half hour on rotating 6 week schedule

    Here it is. It cleans to null the desire column(s) within the range given by A1 and B1.
    It colors the range in both sheet1 and sheet2 (if you don't want it eliminate the lines that contain "interior.color"
    It recounts just for that range

    Please Login or Register  to view this content.

  27. #27
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Employee breakdown by half hour on rotating 6 week schedule

    there was a glitch on the marked line
    for some reason the sort is not working properly, but when applied manually it does work!!

    Please Login or Register  to view this content.

  28. #28
    Registered User
    Join Date
    09-28-2010
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2007
    Posts
    32
    Quote Originally Posted by rcm View Post
    there was a glitch on the marked line
    for some reason the sort is not working properly, but when applied manually it does work!!

    Please Login or Register  to view this content.
    That looks great. Which sh1's do i need to change to have the date selection on sh2?

  29. #29
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Employee breakdown by half hour on rotating 6 week schedule

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 05-09-2016, 11:35 PM
  2. Replies: 4
    Last Post: 09-15-2014, 10:07 AM
  3. How do I create a rotating roster for a 10 week on 2 week off schedule
    By MacknMeggs78 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-02-2014, 09:18 PM
  4. [SOLVED] Overtime and payment at half hour intervals with a lower payment for the first half hour
    By brettamine in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-24-2014, 07:51 AM
  5. EOWEO 12 hour rotating shift schedule
    By moipaman in forum Excel General
    Replies: 0
    Last Post: 07-25-2013, 11:20 PM
  6. [SOLVED] Formula to calculate if employee is working on each half hour
    By holowugz in forum Excel General
    Replies: 10
    Last Post: 07-16-2012, 08:29 PM
  7. [SOLVED] rotating 12 hour schedule shared with 3, one weekend off monthly
    By koalabusdriver in forum Excel General
    Replies: 1
    Last Post: 03-01-2005, 11:06 AM

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