+ Reply to Thread
Results 1 to 4 of 4

Counting workers on shift per hour overnight

Hybrid View

  1. #1
    Registered User
    Join Date
    12-16-2015
    Location
    New Orleans
    MS-Off Ver
    2013
    Posts
    1

    Counting workers on shift per hour overnight

    I have a schedule template that allows me to see how many people I have working each hour. However, the formula breaks when I have someone working across midnight. Can someone take a look and see how I might modify this to make it work appropriately?

    count workers per hour.xlsx

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Counting workers on shift per hour overnight

    Ignore this post.
    Last edited by JieJenn; 12-16-2015 at 05:29 PM.

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Counting workers on shift per hour overnight

    Nm. I misunderstood your question.

    I ended up using a helper column. See attached.
    Attached Files Attached Files
    Last edited by JieJenn; 12-16-2015 at 05:50 PM.

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Counting workers on shift per hour overnight

    I created a Gantt chart and used that to produce the employee count for each hour. I filled C3:U3 with the hours.
    In C4 this formula was entered and filled across and down:
    Formula: copy to clipboard
    =IF($A4="","",IF(AND($A4<$B4,C$3>=$A4,C$3<=$B4),1,IF(AND($A4>$B4,C$3>=$A4,C$3>=$B4),1,IF(AND($A4>$B4,C$3<=$A4,C$3<=$B4),1,""))))

    C26 has this formula filled across:
    Formula: copy to clipboard
    =SUM(C4:C25)

    B33 has this formula filled down:
    Formula: copy to clipboard
    =INDEX($C$26:$U$26,MATCH(A33,$C$3:$U$3,0))


    In the black area of the Gantt chart are 1s and those 1s are then summed under the chart.
    Attached Files Attached Files
    Last edited by newdoverman; 12-16-2015 at 06:33 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ 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. Calculating Number of Workers per Half Hour
    By vioravis in forum Excel General
    Replies: 1
    Last Post: 10-14-2015, 09:55 PM
  2. Replies: 2
    Last Post: 06-20-2015, 11:49 AM
  3. Replies: 0
    Last Post: 03-16-2015, 01:50 PM
  4. Calculating Work hours overnight with a 6th hour meal period
    By aryan8582 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-17-2014, 02:05 PM
  5. Calculation of shift allowance affected by overtime and overnight shifts
    By danb1985 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-09-2014, 06:16 AM
  6. [SOLVED] Timesheet Calculation for Shift workers
    By ktbja in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-24-2014, 08:46 AM
  7. 12 hour shift times
    By Cboggie in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-15-2010, 10:00 AM

Tags for this Thread

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