Generating a 4 On/4 Off Work Schedule

Written by Allen Wyatt (last updated January 14, 2023)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021


Danni's company uses a rotating 4 on/4 off work schedule, using 12-hour shifts. (Employees work 7:00 am to 7:00 pm for 4 days, then are off for 4 days, then work 7:00 pm to 7:00 am for 4 days, then are off for 4 days, etc.) The company never closes, even for holidays, but Danni would like to use Excel to forecast six-month work schedules for individual workers. It isn't readily apparent to Danni how the various workday-related functions in Excel could be used for this.

There are two templates that Microsoft makes available—Shift Work Calendar and Shift Work Calendar Year at a Glance—that may do the trick for Danni's needs. But, it wouldn't be too hard to create your own workbook to generate the schedule. The key to this is remembering that dates are nothing but numbers, so you can do all the necessary calculations without the need of resorting to any of Excel's built-in workday functions.

Let's take a look at a simple example of what I mean. You could put a date such as "1/1/23 7:00 am" into cell A1, and then format the cell so that it shows the date and time. (See Figure 1.)

Figure 1. A date added and formatted.

Now, in cell A2, enter the formula =A1+1 and format the cell the same was as you formatted cell A1. (See Figure 2.)

Figure 2. Incrementing the date.

Now you can use the same formula in cells A3 and A4, and you end up with a four-day morning schedule. Now, in cell A5, you can use the formula =A1+8.5 and do the formatting. (See Figure 3.)

Figure 3. Starting a new cycle.

Notice that the date shown now shows 7:00 PM, just as you would want for the next shift cycle. This is because you added a half day (.5) to the date, which moved it by 12 hours.

You could continue making formula adjustments in this manner in order to set up your schedule, but remember that the tricky part is to make sure you add the half day when you should and subtract it when you should, in order to do the AM/PM shift change properly.

Another way to approach the issue is to, in column A, put all the dates in your six-month period. Then, in column B, you could use a formula like this:

=CHOOSE(MOD(A1,16)+1,"7:00 to 19:00","7:00 to 19:00","7:00 to 19:00","Off","Off","Off","Off","19:00 to 7:00","19:00 to 7:00","19:00 to 7:00","19:00 to 7:00","Off","Off","Off","Off","7:00 to 19:00")

Copy the formula down for each date in column A, and you can see the schedule pattern. All it does is to divide the date—again, remember that dates are nothing but numbers—by 16 and then return one of three values that indicate when (or if) the person is working that day. You would need to check to make sure that the value returned matches your company's records, and if it doesn't, adjust the CHOOSE function appropriately.

In fact, this approach (using CHOOSE) doesn't even require that the dates be in sequential order. You can use any date with the formula, and it will do the calculation just fine and return whether (or if) that date is a workday.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10759) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...


Aligning Positive and Negative Whole Numbers in a Column

When you use a table to present numeric information, you may want to have Word align the numbers in the table. This can ...

Discover More

Automatically Formatting Graphics and Shapes

Want to change the graphics formatting defaults in Word? You can customize some of these defaults, saving yourself some time.

Discover More

Extracting a State and a ZIP Code

Excel is often used to process or edit data in some way. For example, you may have a bunch of addresses from which you ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Month for the Nth Sunday

Doing math with dates is quite easy in Excel. As this tip illustrates, this fact makes it easy to figure out the Nth ...

Discover More

Tombstone Date Math

Doing math with dates is easy in Excel. Doing math with old dates, such as those you routinely encounter in genealogy, is ...

Discover More

Determining If a Year is a Leap Year

Need to figure out if a given year is a leap year? It's not as easy as you think! This tip provides a plethora of ways ...

Discover More

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 9 + 4?

2023-01-16 10:24:56

J. Woolley

Well done.

2023-01-16 00:59:41


I created a two-sheet Excel workbook using approach from my earlier comment, but I also added the sheet for assigning workers to teams.
Feel free to use it, or modify it. Check the description Sheet for details. It works with MS 365 but can be easily adopted to earlier versions.

I am sharing this file via my OneDrive using the link:!AnwQtlPv1u28gvleJYwPQeIp_fxXDQ?e=PmfoYB

2023-01-16 00:37:53


Sorry to say, but I think the Microsoft calendars are to complicated to be used. I tried to figure them out and decided it would be way easier to create my own.
Also the formulas Allen suggested would have to be tweaked for every person or team to cover all shifts. It is way easier to create the schedule manually.
Start with putting all your dates in column A, as Allen suggested, making sure they are in sequence.

The 4-on/4-off schedule requires for teams to cover all shifts, and the schedule will repeat on 16-day cycle. You could try use some formulas, but it is as easy to fill the four columns manually as shown (see Figure 1 below)

When you select the 4 column by 16 days block and then double-click on the fill handle, the schedule will copy as a pattern all the way down to the last date in column A (provided all cells below are empty).

Then, you can add filter to the whole schedule (shown in Figure 1) to only display dates you want. In particular it is easy to filter by month.

Instead of assigning just teams as column headings, you can assign individual names copying relevant columns to the right as needed.

Figure 1. 

This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.