+ Reply to Thread
Results 1 to 4 of 4

Best way to count?

  1. #1
    Registered User
    Join Date
    04-08-2013
    Location
    Illinois
    MS-Off Ver
    Office 365
    Posts
    26

    Best way to count?

    Hello all,

    I'm posting this here for some direction on the best way to do something. I'm trying to figure out for 2 years, the number of people we had working at a station at a given time. I will have data exported as:

    Name, Shift Start Date, Shift Start Time, Shift Stop Date, Shift Stop Time, Station, Total Hours.

    We have usually 4 people at a station, and they usually work 0600-0600 shifts, or 0600-1700 and 1700-0600 if some part timers are working. Sometimes, there might be trades, or overtime, or classes, etc. that would cause one person to be on maybe 0600 - 1200, then a different guy 1200-1800, and someone else 1800-0600.

    The information I ultimately need out is a count of how many day shifts (0600-1700) and night shifts (1700-0600) had 3, 4, or 5 people working.

    Any ideas on the best way to have this work? I'm stuck even on the route to go - COUNTIF statements, or Pivot tables or something totally different? I was asked once for this information for 1 station, and it wasn't that hard to just count each day, but now I've been asked to do it for all 3 stations, and for 2 years, and it sounds like it will be a reoccurring request, so it would be much easier if I can have Excel just give me the information. I have attached a sample of the data I will get out so that it might help. In the sample, Oct 4 and Oct 6 are "normal" days - 4 guys working four 24 hour shifts. Oct 5th is one of the odd days though. I'd be happy enough with saying how many people are working at 6am and how many people are working at 5pm each day, if that is an easier way to do it.

    If someone could just give me at least an idea of where to head?

    Thanks!
    Attached Files Attached Files
    Last edited by treydawgmt; 10-20-2018 at 08:47 AM. Reason: Forgot attachment

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Best way to count?

    Does this help?

    I manually changed the orange filled cells for testing purposes...

    =SUMPRODUCT(--(M3+N3>=$D$3:$D$18+E$3:E$18),--(M3+N3<$F$3:$F$18+G$3:G$18))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    04-08-2013
    Location
    Illinois
    MS-Off Ver
    Office 365
    Posts
    26

    Re: Best way to count?

    Quote Originally Posted by Glenn Kennedy View Post
    Does this help?
    Yes, it totally does! Plus, I think this will be pretty easy to make it look "pretty" for the bosses as well, in a simplified location by using this information on another sheet.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Best way to count?

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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: 2
    Last Post: 03-03-2018, 05:00 AM
  2. Replies: 1
    Last Post: 05-19-2017, 07:37 AM
  3. Replies: 17
    Last Post: 04-11-2016, 11:14 PM
  4. User defined function- count color and count only visible rows
    By marsjanik1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-17-2016, 03:05 PM
  5. Macro count items in sheet2 and provide count in embedded label in sheet1
    By jaredmccullough in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-05-2015, 11:27 AM
  6. Range.columns.count property returns wrong count after union operation
    By gopinan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-13-2008, 04:48 AM
  7. Replies: 18
    Last Post: 09-06-2005, 06:05 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