+ Reply to Thread
Results 1 to 3 of 3

Count how many days in a row an employee is working

  1. #1
    Registered User
    Join Date
    01-26-2012
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    2

    Count how many days in a row an employee is working

    Hi,
    I'm new here, so if this question is posted elsewhere, sorry.

    I have 92 employees that I need to keep track of whether they are working too many days in a row.
    I have a spreadsheet with everyone's names and nine days worth of data. In column a is everyone's name. In columns c3:k3, it tells me how many hours each employee is working each day. I don't need the total hours. I need a formula to tell me if they have too many days in row or whether they are good. They cannot work more than six days in a row.
    I've tried subtotal and filters and countif, but I can't get it.

    Here is what I have been experimenting with, but it's doesn't take into account how many days in a row: =IF(MAX($C3:$K3)>6,"Too Many Days","Good to Go")
    It only works if the data is presented like this:
    4.5 8 4 4.5 8 4.5 8
    If there are blanks (i.e. a day off), it still returns too many days even if they aren't working more than six days in a row.

    I would like a column (column b preferably) to return either too many days OR good to go if they are scheduled more than six days in a row.
    If I had to rate my excel knowledge, it'd be a 5/6 on a scale of 1-10, so I am really stuck.

    Please help if you can!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Count how many days in a row an employee is working

    Welcome to the board.

    =IF(MAX(FREQUENCY(IF(C3:K3>0, COLUMN(C3:K3)), IF(C3:K3=0, COLUMN(C3:K3)))) < 7, "OK", "Bad")

    The formula MUST be confirmed with Ctrl+Shift+Enter, not just Enter.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    01-26-2012
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Count how many days in a row an employee is working

    Thank you so much! That absolutely works!

+ 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