+ Reply to Thread
Results 1 to 4 of 4

Need a formula to check shifts in a roster

  1. #1
    Registered User
    Join Date
    10-02-2012
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    Excel 2007
    Posts
    14

    Need a formula to check shifts in a roster

    Hi All,

    I am working with a roster and can not understand which formula to use for checking shifts one after another. I have attached sample roster file here.

    My Sifts are: SM = Super Morning, M = Morning, E = Evening, SE = Super Evening, N = Night, OFF = Off Day.

    Conditions are:
    1. Any employee will not join for SM or M shift after SE shift.
    2. Any employee will not join for SM shift after E shift.
    3. Any Female employee will not join for SE shift.

    I need formula to check these conditions. The function may return "Check" or "OK" in the cell it works in. Please help if you can. Thanks in advance.

    Arif
    Attached Files Attached Files
    Arif Masum...

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Need a formula to check shifts in a roster

    In cell K3 try:

    =IF(AND(OR(C3="Male",COUNTIF(D3:J3,"SE")=0),SUMPRODUCT((D3:I3="E")*(E3:J3="SM"))=0,SUMPRODUCT(--(D3:I3="SE"),--(ISNUMBER(FIND("M",E3:J3))))=0),"OK","Check")

  3. #3
    Registered User
    Join Date
    10-02-2012
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Need a formula to check shifts in a roster

    Thanks a lot Andrew-R for your quick reply. The formula works fine with condition 2 and 3. But it does not work with condition1 which is any employee will not join SM or M shift after doing SE shift. Can you please help me to write that formula too.. Thanks a lot again.

  4. #4
    Registered User
    Join Date
    10-02-2012
    Location
    Dhaka, Bangladesh
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Need a formula to check shifts in a roster

    Well now it works fine with all conditions.. I removed those (--) from the formula that's why it was not working. can you please explain the formula?? that will be very much helpful for all of us.. Regards.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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