+ Reply to Thread
Results 1 to 5 of 5

Rolling Hours sumed in a day

  1. #1
    Forum Contributor
    Join Date
    08-11-2013
    Location
    london
    MS-Off Ver
    Excel 365
    Posts
    270

    Rolling Hours sumed in a day

    I tried to explain this in another post but messed the wording and uploaded the wrong file!

    I hope the below makes more sense.

    Cell A1 – H14 is the team rota, the time in each cell is the time they start their shift i.e. B8 Staff 6 starts at 12:30
    Cells B16 C21 is the start time and the end time of the shift i.e. if staff 6 starts at 12:30 they finish at 21:00.

    In Columns K – S I need this time frame to be counted within each 15 minute interval.

    So in the example in Column M two members of staff start at 9:30 (Staff 1 & Staff7) so in column M from 9:30 till 12:30 it counts as 2 members of staff in, but at 12:30 when staff 6 & Staff 12 arrive the number increases to in column M row 26 to 4 members in. This continues to increase as more staff arrives throughout the day, until the staff members shifts come to an end, so when the 9:30 starters (Staff 1 & Staff7) leave at 18:00 the count drops to 4 members in.

    Im looking for this to be automated so it can count the staffing levels for each day, so in column N it would reference the shift times in C3 : C14.

    I hope that makes more sense, I apologies that the break down was so bad, I was in my own head on this one.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Rolling Hours sumed in a day

    Put this in M3 and drag across then down:
    =COUNTIFS(B$3:B$14,"<="&$K29+1/1440,B$3:B$14,">="&$K29-0.354166666666667)

    I had to add the 1/1440 due to the rounding of minutes (e.g. 1:30 in cell B7 was actually 0.5625, but in K29 it was 0.5624999999998.

    I also think you had some improper values, such as at 1pm.
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Rolling Hours sumed in a day

    Posted my answer, then noticed you have Excel 2003 which does not have COUNTIFS. Use this instead:
    =SUMPRODUCT(--(B$3:B$14<=$K3+1/1440),--(B$3:B$14>=$K3-0.354166666666667))
    But enter it with Cntl-Shift-Enter

  4. #4
    Forum Contributor
    Join Date
    08-11-2013
    Location
    london
    MS-Off Ver
    Excel 365
    Posts
    270

    Re: Rolling Hours sumed in a day

    Thank you so much!

    This has made my spread sheet a lot cleaner!

    Can I ask what is the logic behind +1/1440

    Once again thank you for the help!

  5. #5
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Rolling Hours sumed in a day

    See my initial post on why the 1/1440 was needed. If that still doesn't make sense, let me know.

+ 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. How Do You Make A Rolling Calendar Where The Hours Drop off After A Year
    By jnmergy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-07-2013, 08:10 AM
  2. Replies: 1
    Last Post: 07-05-2013, 10:38 AM
  3. Calculation of rolling hours for time sheets
    By olechkq in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-19-2012, 11:21 AM
  4. Rolling over man hours into next month page tab
    By gtudor in forum Excel General
    Replies: 1
    Last Post: 05-02-2012, 08:08 AM
  5. Replies: 0
    Last Post: 02-01-2006, 09:10 PM

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