+ Reply to Thread
Results 1 to 9 of 9

Rotating shift

  1. #1
    Registered User
    Join Date
    10-11-2014
    Location
    Noitacol, Acirema
    MS-Off Ver
    Office 365 2019
    Posts
    53

    Talking Rotating shift

    I want to create a sheet which will tell me what days I'm off on a rotating schedule
    The schedule is as follows

    Sunday____Monday____Tuesday___Wednesday_Thursday__Friday_____Saturday__Sunday____Monday____Tuesday___Wednesday_Thursday__Friday_____Saturday
    04 Sep 16__05 Sep 16__06 Sep 16__07 Sep 16__08 Sep 16_09 Sep 16__10 Sep 16_11 Sep 16__12 Sep 16__13 Sep 16_14 Sep 16__15 Sep 16_16 Sep 16__17 Sep 16
    ON_________OFF_______OFF________ON_________ON______OFF________OFF______OFF________ON_______ON_______OFF_______OFF_______ON________ON

    And it continues to rotate like this, I want to be able to type in any given date (past, present, or future) and have to automatically tell me if I'm on or off that day, can anyone help me accomplish this?

  2. #2
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Rotating shift

    For the date in A2:-

    =INDEX({"On","On","Off","Off","On","On","Off","Off","Off","On","On","Off","Off","On"},(MOD(A2-DATEVALUE("4 Sep 2016"),14)+1))

    Shifted rota in array once to right as first index will be 0 and last will be 13 (+1)
    Last edited by Neil_; 09-08-2016 at 02:19 AM.
    Frob first, tweak later

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,603

    Re: Rotating shift

    Or this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Start your shift with ON or OFF and after that you will get alternate:

    Please Login or Register  to view this content.
    If you want to start with double ON or OFF then just create one more shift at the start with opposite shift.

  4. #4
    Registered User
    Join Date
    10-11-2014
    Location
    Noitacol, Acirema
    MS-Off Ver
    Office 365 2019
    Posts
    53

    Re: Rotating shift

    OK I'm not sure I understand how any one of these formulas works, I want to be able to have a blank cell where I could type in any date, then it will say if I'm off or on, Not sure how I could do that with either of these formulas. Am I missing something?

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,603

    Re: Rotating shift

    Attach a sample workbook that takes variate examples that you might run into. (Like what you mention above, what if you are sick how shifts continue etc).

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  6. #6
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Rotating shift

    Paste my formula in a blank workbook in any other cell than A2 and type your date in A2.

  7. #7
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Rotating shift

    Looking at your data it seems to me that if the week number is even the shift cycle goes (Monday - Sunday)

    Off-Off-On-On-Off-Off-Off

    and for an odd week number it goes

    On-On-Off-Off-On-On-On

    If this is so you could use the excle function "WEEKNUM" to set up a formula.

    Alf

  8. #8
    Registered User
    Join Date
    10-11-2014
    Location
    Noitacol, Acirema
    MS-Off Ver
    Office 365 2019
    Posts
    53

    Re: Rotating shift

    Quote Originally Posted by Neil_ View Post
    Paste my formula in a blank workbook in any other cell than A2 and type your date in A2.
    OK Cool, with some slight modification on the order of the "off's and On's" it worked!

  9. #9
    Registered User
    Join Date
    10-11-2014
    Location
    Noitacol, Acirema
    MS-Off Ver
    Office 365 2019
    Posts
    53

    Re: Rotating shift

    Quote Originally Posted by Alf View Post
    Looking at your data it seems to me that if the week number is even the shift cycle goes (Monday - Sunday)

    Off-Off-On-On-Off-Off-Off

    and for an odd week number it goes

    On-On-Off-Off-On-On-On

    If this is so you could use the excel function "WEEKNUM" to set up a formula.

    Alf
    I get what you're saying, and I'm sure you can use WEEKNUM somehow, but I'm not good enough with Excel yet to devise a formula like that, how would I even start that?

+ 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. Caculating # of Day Shift Hrs & Night Shift Hrs of a Given Shift
    By DaKhoda in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-29-2014, 08:36 PM
  2. Rotating Shift schedule for 1 month
    By varun sarolkar in forum Excel General
    Replies: 0
    Last Post: 12-02-2013, 03:34 AM
  3. Shift Rota/Calendar 5 crews Rotating Shift
    By Flynn Rider in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-07-2013, 08:03 AM
  4. EOWEO 12 hour rotating shift schedule
    By moipaman in forum Excel General
    Replies: 0
    Last Post: 07-25-2013, 11:20 PM
  5. Replies: 4
    Last Post: 02-06-2013, 04:21 AM
  6. Jump to future date on rotating shift roster
    By garyboy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-19-2011, 02:39 PM
  7. Macro for a Rotating Shift Schedule
    By smck in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-25-2005, 12:05 AM

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