Results 1 to 2 of 2
  1. #1
    govuser1 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    6

    VBA or other method to count number of employees per hour using start and end times?

    I am trying to get number of employees per hour using their start and stop times.

    I can do this in excel using

    =(COUNTIF($F$2:$F$42,">"&A2)-COUNTIF($E$2:$E$42,">"&A2))

    In a table like
    Time # per hr Start Stop
    0 4 0 800
    1 4 0 800
    200 4 0 800
    300 4 0 800
    400 4 600 800
    500 4 600 800
    600 6 800 1600
    700 6 800 1400
    800 13 800 1600
    900 14 800 1600

    ect ect ..

    I need to do this same thing in Access ....I have been searching for anyway and am coming up blank

    Table with Start and End times in the table unlike the excel example above in the table the start and end times are all 4 digits no "zero's" are dropped in the times in case that matters (eg 0000, 0100, 0200, 0300 ect)

    Any help with VBA or any other method that will return number of employees on duty each hour



    Thank you,

  2. #2
    govuser1 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    6
    ok ..kinda figured it out

    =Count(IIf([End]>1500,1))-Count(IIf([Start]>1500,1)) in a text box (one for each time) worked.

    I would much rather do this in VBA if someone has any ideas thou.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 10-20-2013, 10:04 AM
  2. Replies: 1
    Last Post: 12-10-2012, 09:16 AM
  3. Replies: 14
    Last Post: 02-23-2012, 06:32 PM
  4. Rounding number up to half hour
    By crxftw in forum Forms
    Replies: 2
    Last Post: 08-23-2011, 07:29 AM
  5. Replies: 2
    Last Post: 02-12-2011, 12:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums