Custom Calendar Schedule: Is a 14 days on/14 days off cycle (not manually entered) possible in Project 2010 or 2013? RRS feed

  • Question

  • I need to create a custom calendar in Project 2010 (I'm using Project 2013 to build this calendar/template) which has 14 days (ex; June 16 to June 29) straight of work (6am-6pm) each day, the next 14 days (ex; June 30 to July 13) off - non working time. This cycle needs to continue indefinitely into the future.

    I have tried setting ALL days to the 6a-6p working time under the Work Weeks (2nd) tab in the Change Working Time dialog box to begin.  Then, using the exceptions (1st) tab/details button to set up a daily or weekly schedule as non-working time.  I first tried to use as few exceptions rows as possible, so I used weeks - making 6/2-6/6 non-working and repeating every 4 weeks into the far future.  Then I tried to make the entire (Su-Sa) following week non-working using the same tab, weekly, every 4 weeks.  I get the following message:

    "The exception conflicts with #1 "beg"  They both use the same type of exception, Weekly, and their interval overlaps.  Either change the date range or change the type of exception."

    I can do the Sun-Mon part of the following week, but not days that "overlap" with dates already set.  The problem is that the dates DO NOT overlap, they are for the following week and every 4 weeks following, which is the next week AFTER the "beg" date range.  I adjust the starting date to allow for this, but it is apparently ignored.  I tried single days too, but the minute one "overlaps",  I could set no more.

    Does anyone have a suggestion?  Is a 14 day on / 14 days off setup possible to "automate" in the 2010/2013 Project calendar?  I know I can manually set this up, but that will take too much time;  I have to also do two other resource base calendars for Wed and Thus start dates.

    Tuesday, June 23, 2015 12:34 AM

All replies

  • George,

    You're right the dates themselves do not overlap, but the intervals DO overlap and that's why you can't use a recurring exception pattern to do what you want.

    I see a couple of options. Go ahead and set up a week's exception for a recurrence of 7 days. Then set up the next week exception to cover the following 7 days. Then continue setting up weekly paired exceptions spaced out in the 14 off / 14 on pattern you want. It is actually a little quicker if you simply select the first day of the "off" period and drag through 14 days, then set that as an exception. Move two weeks ahead and repeat. Yeah, it's a bit of a pain, but you can pretty quickly set up the calendar you need.

    The other method for doing what you want is with some VBA. That would automate the process. If you are interested, I could code that up for you.


    Tuesday, June 23, 2015 2:03 AM
  • John,  I have coded a bit in Project 2003 VBA for task settings.  I did not know you could code for the calendars too.  I am interested in a VBA solution if you have one.  Thank you for your verification and help.
    Tuesday, June 23, 2015 11:55 PM
  • George,

    You can do pretty much whatever you want with VBA. The following macro should give you a running start. It might be useful to also have a macro that deletes all exceptions from a given calendar but I'll leave that as an "exercise for the student".

    If it answers your question, please mark this as the answer or at least consider giving a vote.


    Sub Dayson_Daysoff_calendar()
    'This macro will create a 14 days on/14 days off sequence
    'It is based on a copy of an existing 7 day workweek calendar with default work time (8am to 5pm with 1 hour lunch)
    'The number of exceptions is arbitrarily set at 25. That will cover just short of 2 years
    'Macro written by John-Project June 24, 2015
    Dim SD As Date
    Dim FD As Date
    Dim Seed As String
    Dim i As Integer
    'first create the new custom calendar
    On Error Resume Next    'in case the custom calendar already exists
    BaseCalendarCreate Name:="14on-14off", FromName:="7-day week"
    On Error GoTo 0
    'Ask user for the date to start the 14on/14off sequence
    '   if no date is entered assume current date
    Seed = InputBox("Enter sequence start date as mm/dd/yy")
    If Seed = "" Then Seed = ActiveProject.CurrentDate
    'add 13 days + 9 hours to arrive at a finish of 5:00 pm
    FD = DateAdd("h", 321, Seed) 'add 14 days to the start date
    For i = 1 To 25
        ActiveProject.BaseCalendars("14on-14off").Exceptions.Add Type:=1, Start:=Seed, Finish:=FD, Name:="exception " & i
        Seed = DateAdd("d", 28, Seed)   'sets start of next group 28 days later at 8:00 am
        FD = DateAdd("h", 321, Seed)    'sets finish of next group 13 days later at 5:00 pm
    Next i
    End Sub

    Wednesday, June 24, 2015 3:16 AM
  • Why doesn't project as advanced as it is have a way to choose the number of days in it's cycle?
    Monday, March 9, 2020 8:03 PM
  • That sounds maybe like what you were talking about. how do you change the number of days on the cycle?

    Monday, March 9, 2020 8:06 PM
  • How do you automate a 2 week cycle? It seams like this should be a fundamental option.
    Monday, March 9, 2020 8:13 PM
  • MattttH,

    Are you asking how to modify the code I posted or are you asking why the developers haven't expanded the functionality of Project? The former I can help, the latter, post your suggestion to the following:


    • Edited by John - Project Monday, March 9, 2020 11:55 PM userfeedback
    Monday, March 9, 2020 8:28 PM
  • It is not hard to set exceptions for the off days. First start by making a 7 days/week calendar by copying the standard calendar and make Saturdays and Sundays working days (work weeks tab). Then choose a starting day for the cycle. It is the need to choose a starting day that prevents this from being more "automated". This is 10 on/4 off.

    Tuesday, March 10, 2020 12:06 AM