+ Reply to Thread
Results 1 to 4 of 4

Countif forumla question with time, please help!

  1. #1
    Registered User
    Join Date
    05-02-2005
    Posts
    9

    Countif forumla question with time, please help!

    So I'm creating an employee schedule for my office and I need to make sure I have the proper floor coverage. So lets say on Monday I have 5 guys working 9:00 -5:00 and 4 guys working from 2:00 to 10:00. I would like a forumla that would look at all of the staff on monday and countif they were working day or night shift.

    Please let me know if u need more info.

    Thanks

  2. #2
    Registered User
    Join Date
    10-18-2006
    Posts
    49
    Not sure in what format your data entry is.
    I suggest you enter the data in the following way and then its easy:
    - 1st column should have name or ID or whatever
    - 2nd column should be shift start time (ex: 09:00 or 14:00)
    - 3rd column should be shift end time (ex: 05:00 or 22:00)
    keep the 2nd and 3rd column in time format

    and then enter the following formula wherever you want the summary:
    =COUNTIF(D2:D8,"09:00") for no. of guys in dayshift
    =COUNTIF(D2:D8,"14:00") for no. of guys in nightshift

  3. #3
    Registered User
    Join Date
    05-02-2005
    Posts
    9

    that would work but,

    what if I have a bunch of different shifts that start before noon. I would all of them count as morning shifts. Such as 8am, 9am, 10am. Can I do it as a lesser or greater than time, and when u do that does the value have to be set in military time???

    Thanks

  4. #4
    Forum Contributor
    Join Date
    10-27-2006
    Location
    United Kingdom
    MS-Off Ver
    EXCEL 2003 (2007 at home)
    Posts
    517

    12 or 24 hour clock

    Excel treats times as 24 hour clock.
    However if you set the cell format to "h:mm AM/PM" then it will display as 12 hour with AM or PM.

    You can also enter (for example) 11:00 PM and Excel will convert it to 23:00.
    Note : The space between the time and AM/PM is required (otherwise it treats the value as text).

    Thus although you can enter and display in 12 hour format, internally Excel converts it to 24 hour format.

    Mark.
    Last edited by Mark@Work; 11-15-2006 at 02:03 PM.

+ 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