+ Reply to Thread
Results 1 to 9 of 9

Excel 2007 : Headcount Based on Date & Start/Stop Times

  1. #1
    Registered User
    Join Date
    05-10-2011
    Location
    Northern California
    MS-Off Ver
    Excel 2007
    Posts
    5

    Headcount Based on Date & Start/Stop Times

    I am trying to create a headcount by half hour list based on scheduled start dates and start/stop times. See attached spreadsheet with Data worksheet and Report worksheet. How can I automate the report build?
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Headcount Based on Date & Start/Stop Times

    See attached to see if I understood correctly.

    You would be best to change the time columns to actual time inputs and the dates in Report changed to actual dates... you can format as mm/dd if you want....

    Then formula in B5 would be:

    =COUNTIFS(Data!$D:$D,">="&$A5,Data!$D:$D,"<="&$A6+TIME(0,30,0),Data!$A:$A,B$4)

    copied down and across.

    You can format the results as custom: 0;-0;;@ to hide the 0 results...
    Last edited by NBVC; 05-10-2011 at 02:22 PM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    05-10-2011
    Location
    Northern California
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Headcount Based on Date & Start/Stop Times

    NVBC - thanks for the response. I didn't see an attachment though.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Headcount Based on Date & Start/Stop Times

    Sorry 'bout that...
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-10-2011
    Location
    Northern California
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Headcount Based on Date & Start/Stop Times

    Sorry, but I don't think I described what I am after well enough. The report should list the total number of employees working at each half hour interval. For example, on 5/9 the fourth employee starts at 10:00 a.m. At 10:00 a.m., there would be 4 employees working. The example report on my sample spreadsheet lists what the expected results would be. Than you very much for your help.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Headcount Based on Date & Start/Stop Times

    Ok, with same conditions as before... i.e. actual times in column D and E of Data... and actual dates in row 4 of Report, use formula:

    =COUNTIFS(Data!$A:$A,B$4,Data!$D:$D,"<="&$A5)-COUNTIFS(Data!$A:$A,B$4,Data!$E:$E,"<="&$A5)

    copied down and across the columns.

    Again, hide the 0's by formatting as custom: 0;-0;;@
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-10-2011
    Location
    Northern California
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Headcount Based on Date & Start/Stop Times

    Looks great! Last question: how would I automate the population of the dates in cells B4..F4?

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Headcount Based on Date & Start/Stop Times

    Not sure what you mean?

    Do you mean how I converted to real date?

    If yes, I typed May 5, 2011 in F9 and dragged across it incremented by one day.

    If you mean using a formula, then after date is entered in B4, then in C4, =B4+1 copied across....

    not sure I interpreted the question correctly though...

  9. #9
    Registered User
    Join Date
    05-10-2011
    Location
    Northern California
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Headcount Based on Date & Start/Stop Times

    The intent is to extract the work schedule data from a database, paste it into the cells on the Data worksheet, and have the report automatically generated (i.e., the headcounts by half hour and the dates would automatically be generated - there would be no need to key in dates). I am trying to automate this process as much as possible for the end user. Thanks again for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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