Closed Thread
Results 1 to 8 of 8

Formula to count number of employees staffed per 30 min interval

  1. #1
    Registered User
    Join Date
    08-17-2016
    Location
    Indiana
    MS-Off Ver
    Office 2013
    Posts
    3

    Post Formula to count number of employees staffed per 30 min interval

    Hello,

    I am looking for a formula to count the number of employees staffed per 30 min interval based on a list of start and stop times.

    Ex.. based on the table below, how many are staffed at 6:30 am and how many at 7:00 am...etc...?

    This did not copy over correctly.. in the 1st row, 6:30 am is the start time and 3:00 PM is the end time


    EMP A 6:30 AM 3:00 PM
    EMP B 6:30 AM 3:00 PM
    EMP C 6:30 AM 3:00 PM
    EMP D 6:30 AM 3:00 PM
    EMP E 6:30 AM 3:00 PM
    EMP F 6:30 AM 3:00 PM
    EMP G 6:30 AM 3:00 PM
    EMP H 8:00 AM 4:30 PM
    EMP I 8:30 AM 5:00 PM
    EMP J 8:30 AM 5:00 PM
    EMP K 8:30 AM 5:00 PM
    EMP L 8:30 AM 5:00 PM

    I have seen this before on a sheet that someone else created, and i believe it was a version of a countifs, but I'm not able to replicate it.

    Thanks,

    Don
    Last edited by dbarton0231; 08-17-2016 at 12:28 PM.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula to count number of employees staffed per 30 min interval

    If the end time was 6:30 AM should that be counted within the 6:30 AM interval?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    08-17-2016
    Location
    Indiana
    MS-Off Ver
    Office 2013
    Posts
    3

    Re: Formula to count number of employees staffed per 30 min interval

    The end time should not be counted. For your example, if the end time is 6:30 PM, that would not be counted as being staffed at 6:30 PM.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula to count number of employees staffed per 30 min interval

    I'm assuming you want a concurrent count.

    Data Range
    A
    B
    C
    D
    E
    F
    1
    ------
    ------
    ------
    ------
    ------
    ------
    2
    EMP A
    6:30 AM
    3:00 PM
    6:30 AM
    7
    3
    EMP B
    6:30 AM
    3:00 PM
    7:00 AM
    7
    4
    EMP C
    6:30 AM
    3:00 PM
    7:30 AM
    7
    5
    EMP D
    6:30 AM
    3:00 PM
    8:00 AM
    8
    6
    EMP E
    6:30 AM
    3:00 PM
    8:30 AM
    12
    7
    EMP F
    6:30 AM
    3:00 PM
    8
    EMP G
    6:30 AM
    3:00 PM
    9
    EMP H
    8:00 AM
    4:30 PM
    10
    EMP I
    8:30 AM
    5:00 PM
    11
    EMP J
    8:30 AM
    5:00 PM
    12
    EMP K
    8:30 AM
    5:00 PM
    13
    EMP L
    8:30 AM
    5:00 PM


    This formula entered in F2 and copied down:

    =SUMPRODUCT(--(E2>=B$2:B$13),--(E2<C$2:C$13))

  5. #5
    Registered User
    Join Date
    08-17-2016
    Location
    Indiana
    MS-Off Ver
    Office 2013
    Posts
    3

    Re: Formula to count number of employees staffed per 30 min interval

    Thanks! Works perfect

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formula to count number of employees staffed per 30 min interval

    You're welcome. Thanks for the feedback!

  7. #7
    Registered User
    Join Date
    05-17-2022
    Location
    Malaysia , Kuala Lumpur
    MS-Off Ver
    Google Sheet
    Posts
    1

    Re: Formula to count number of employees staffed per 30 min interval

    Hi,

    - Is it possible to just use start time and use end time as 9 hours?

    - In addition how do I minus those who are going for 1 hour lunch break?

  8. #8
    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,430

    Re: Formula to count number of employees staffed per 30 min interval

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    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.

Closed 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 employees working per hour
    By esmith#001 in forum Excel Formulas & Functions
    Replies: 27
    Last Post: 12-04-2014, 07:46 AM
  2. Replies: 1
    Last Post: 04-29-2014, 04:42 AM
  3. Formula to count number of patients per time interval over 24 hours+
    By RM1984 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-27-2014, 11:30 AM
  4. How to count total number of employees in a managerial path on an org chart
    By mc1502 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-27-2013, 07:40 AM
  5. How to Count number of overlapping rows within a time interval
    By czou6 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-10-2013, 04:45 PM
  6. [SOLVED] count the number of events in an interval
    By invictus in forum Excel General
    Replies: 4
    Last Post: 06-11-2012, 06:17 PM
  7. How to count number of people per time interval
    By chinkygirl in forum Excel General
    Replies: 1
    Last Post: 02-11-2012, 01:33 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