+ Reply to Thread
Results 1 to 3 of 3

Count how many staff per hour

  1. #1
    Registered User
    Join Date
    04-15-2012
    Location
    luton
    MS-Off Ver
    Excel 2007
    Posts
    1

    Count how many staff per hour

    Hi

    I need to work out how many staff I have on site per 15 minutes, problem i an having is when the clock ticks over midnight.
    No need to worry about breaks as my staff are still on site.

    So I have in column B start times, column C finish times and column F times running every 15 minutes: 07:00, 07:15 and so on.

    In column G in line with column F times I have my formula: =SUMPRODUCT(($B$7:$B$20<=F18)*(MOD($C$7:$C$20-$B$7:$B$20,1)>MOD(($C$7:$C$20-TIME(,,1))-F18,1)))

    Work great until midnight then nothing.

    Any help here would be great.

    Edit for now is all seems to be fine except I am loosing the last 15 minutes of the shift.

    Thanks
    Attached Files Attached Files
    Last edited by bobforde; 08-01-2016 at 10:01 AM. Reason: Attachment

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,779

    Re: Count how many staff per hour

    Welcome! Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,552

    Re: Count how many staff per hour

    Quote Originally Posted by bobforde View Post
    Edit for now is all seems to be fine except I am loosing the last 15 minutes of the shift.
    It looks as if the head count looses the first 15 minutes of the shift. Employee 2 works from 6:00 AM to 7:00 AM. The head count has a zero for 6:00 AM, which looks as if it is counting the employees present from 6:00 to 6:15. When you look at the actual values being evaluated you see that the value in B8 is 0.25 and the value in F2 is 0.249999... To account for that you could round the values to x number of decimal places (i.e. six).
    The zero in G2, head count for 7:00 to 7:15, seems appropriate as no employee is present between 7:00 AM and 10:00 AM.
    Try pasting the following formula in G2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let me know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. [SOLVED] Count the number of staff working between times based on staff position
    By sparky1978 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-03-2016, 08:10 AM
  2. Count staff by hour worked per day
    By Delta729 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-13-2016, 03:16 PM
  3. Replies: 5
    Last Post: 02-26-2016, 02:28 PM
  4. Counting Staff by Hour
    By jpickral in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-29-2014, 03:45 PM
  5. creating a staff rota for 24 hour shifts
    By RONJONES in forum Excel General
    Replies: 4
    Last Post: 09-06-2013, 12:02 PM
  6. Replies: 3
    Last Post: 06-21-2013, 10:17 PM
  7. Ensure 24 hour cover for staff rota
    By treebina in forum Excel General
    Replies: 1
    Last Post: 05-21-2011, 05:57 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