+ Reply to Thread
Results 1 to 8 of 8

Scheduling employees - Countif formula building

  1. #1
    Forum Contributor
    Join Date
    01-15-2015
    Location
    New York
    MS-Off Ver
    Excel 2011 MAC
    Posts
    104

    Scheduling employees - Countif formula building

    im trying to figure out the proper countif formula for a few sheets I'm working on

    Excel file is in post #3

    The formula is needed in the Lines tab B8:B38. The range is in the schedule tab B8:B33 for in time. C8:C33 out time.

    In the schedule tab I have Cashier's schedules I want to be able to have their schedules tally in the Lines tab. So if there is a cashier working 8-4:30 I want there to be a "1" in the lines sheet from 8:30AM to 4:45pm (Always stops 15 minutes before the end of their shift in this case stop at 4:30). That would continue for every time listed.

    I have this formula in there and it seems to work but I know it's very basic to that first time, not sure what you would do for the next increment of time since it will need to include the previous time in it's count: =COUNTIF(Schedule!B8:B33,"8:30")

    And how do I get it to fill down stopping at 4:30 for the 8a-5p example I used above. Obviously I need it for the whole range but I want to try to understand it first. Thanks!
    Last edited by Beh162; 01-18-2015 at 09:29 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Scheduling employees - Countif formula building

    Not all members are willing - or able - to download files from file-hosting sites, please upload here to the forum
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    01-15-2015
    Location
    New York
    MS-Off Ver
    Excel 2011 MAC
    Posts
    104

    Re: Scheduling employees - Countif formula building

    Excel sheet copy FORUM.xlsx

    Here is the file

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Scheduling employees - Countif formula building

    So you have 4 cashiers working from 10:00 to 18:30? So, B13 to B32 in Lines is filled with 4?
    Quang PT

  5. #5
    Forum Contributor
    Join Date
    01-15-2015
    Location
    New York
    MS-Off Ver
    Excel 2011 MAC
    Posts
    104

    Re: Scheduling employees - Countif formula building

    Quote Originally Posted by bebo021999 View Post
    So you have 4 cashiers working from 10:00 to 18:30? So, B13 to B32 in Lines is filled with 4?
    It will fill in a 4 from 10:00 down to 18:15

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Scheduling employees - Countif formula building

    You are getting comparisons that won't work. A8:A38 of the Lines sheet are not all times. I.E. 10 is not the same as 10:00 AM. Time is a decimal fraction of a day. Days are integers such as 10 and will always be greater than fractions of a day. 10:00 AM is equivalent to 10/24 (ten 24ths of a day) or in decimal 0.416666666666667. The same is true for all the rest of the integers / whole numbers in that range....11, 12, 1, 2, 3........

    Excel is interpreting and evaluating the rest of your times properly.

    Also in A21 for example you have 1:30 where the pattern suggests you want 1:30 PM, but looking in the formula bar it shows 1:30 AM.

    If those issues are taken care of in that range you'll have a much better chance of getting a formula to work the way you want it to.
    Last edited by FlameRetired; 01-19-2015 at 03:55 PM.

  7. #7
    Forum Contributor
    Join Date
    01-15-2015
    Location
    New York
    MS-Off Ver
    Excel 2011 MAC
    Posts
    104

    Re: Scheduling employees - Countif formula building

    Thanks I fixed those times and got help with the formula's and it's working fine now!

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Scheduling employees - Countif formula building

    Whooohoo! Glad to hear it!

+ 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. Scheduling of employees
    By smokey43 in forum Excel General
    Replies: 2
    Last Post: 03-28-2014, 01:49 AM
  2. scheduling and hour tracking for multiple employees at multiple sites
    By nsswcd in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-20-2013, 11:32 AM
  3. Replies: 0
    Last Post: 05-07-2013, 08:45 AM
  4. Scheduling Employees: Linking Shift Times
    By zarlengp in forum Excel General
    Replies: 0
    Last Post: 09-22-2010, 02:30 PM
  5. [SOLVED] Scheduling employees by dates... LOOKUP or FILTER?
    By ssleene in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-14-2005, 03:00 PM

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