Shift rota template for Excel: a full month from one rotating pattern

A monthly shift rota shows for every person and every day whether they work earlies, lates, nights or are off. In this template you set the shift pattern once, and Excel spreads it across the month, counts the staff per shift and flags short rest between shifts.

In short: the pattern is a list of codes on the Shifts sheet, and every person has an offset. Each cell of the rota works out =INDEX(Pattern,MOD(date-PatternStart+offset,CycleLength)+1)&"". Hours come from SUMPRODUCT(COUNTIF(D7:AH7,ShiftCodes)*ShiftHours), staff per shift from COUNTIF, and conditional formatting marks any shift that starts less than 11 hours after the previous one ended.

Before you start: COUNTIF, mixed references and calculating with times. INDEX and MOD are explained in the exercise.

Try it now

A rotating rota repeats the same pattern over and over; each person just starts at a different point. MOD makes sure that after the last day of the pattern the first one comes round again.

Task The shift pattern in K2:L9 lasts 8 days: two earlies, two lates, two nights, two days off. Day 1 is the pattern start in O1. Each person joins with their offset from column B. In C2, work out Olivia's code for the date in C1. The formula is filled into C2:I4.

ABCDEFGHIJKLMNO
1 Name Offset 4 Jan 2027 5 Jan 2027 6 Jan 2027 7 Jan 2027 8 Jan 2027 9 Jan 2027 10 Jan 2027 Day Code Pattern start 4 Jan 2027
2 Olivia 0 1 E Length 8
3 James 2 2 E
4 Emma 4 3 L
5 4 L
6 5 N
7 6 N
8 7 off
9 8 off

Download the shift rota template

The file holds one month for up to 20 people with week numbers and US or UK holidays, the rotating pattern with offsets, colored codes from a drop-down, planned hours against contract hours, staff per shift with separate minimums for weekdays and weekends, a rest check and an instructions sheet.

Preview of the shift rota in Excel: one month with names, contract hours and offset, colored shift codes per day from the rotating pattern, holidays in red and staff per shift belowEnlarge preview

Download the finished template

The finished Excel file shift-rota-template.xlsx, with sample rows and instructions, is free. All you need is a free account: no subscription, no payment details.

Figures, rates and sample data in the templates are as of 13 November 2026, without guarantee. Check that they still apply to you. The templates are mainly meant to show how to build this in Excel.

Create a free account and download the template Already have an account? Log in

Monthly rota or weekly schedule?

The work schedule template covers one week and you type every code yourself. That suits small teams with changing shifts. The shift rota covers the whole month and fills itself from a fixed pattern, which suits fixed crews on a rotation: a week of earlies, a week of lates, a week of nights, then round again. Both use the same shift times, the same hours formula and the same rest check.

How the rota is laid out

Cell or rangeContentsInput or formula
B2, B3Year, monthInputs, such as 2027 and 1
H2, H3Holidays, week startUS, UK or None; Sunday or Monday
D6:AH6Day 1 to 31=IF(MONTH(DATE($B$2,$B$3,1))=$B$3,DATE($B$2,$B$3,1),"")
A, B, CName, contract hours, offsetInputs
D7:AH26Code per dayFrom the pattern, can be overwritten
AI, AJPlanned hours, difference=SUMPRODUCT(COUNTIF(D7:AH7,ShiftCodes)*ShiftHours)
D29:AH32Staff per shift=COUNTIF(D$7:D$26,Shifts!$A5)

The Shifts sheet lists each code with start, end and break, and column F works out the hours with =ROUND(MOD(D5-C5,1)*24-E5/60,2). Next to it sit the pattern start, the pattern length (up to 28 days) and one code per day. The example is a three-week rotation, Monday to Friday: five earlies, weekend off, five lates, off, five nights, off. Offsets of 0, 7 and 14 make three crews. Row 4 shows the week number: with Sunday in H3 the US count from WEEKNUM, with Monday the ISO week used in the UK.

Spreading the pattern across the month

Every rota cell holds the formula from the exercise plus &"": days off are empty cells in the pattern, and INDEX would show 0 for them. Because the formula follows the date rather than the column, the pattern carries on across the month end. Copy the sheet for February, set B3 to 2, and every crew continues its rotation. How INDEX picks a row from a list is covered in INDEX and MATCH.

Vacation, sickness or a swap are exceptions to the pattern: type the code over the formula or pick it from the drop-down. In the sample, Liam is on vacation from January 18 to 22 and James swaps onto an early on January 7.

Counting hours and staff

Planned hours use the same formula as the weekly schedule: COUNTIF with the whole code list as its criteria counts how often each code appears in the row, and SUMPRODUCT multiplies those counts by the hours. Below the rota, COUNTIF counts the people per shift and day. The minimum staffing is set separately for Monday to Friday (column B) and for weekends and holidays (column C), and a red cell means too few. The mixed references are explained in absolute references.

Rest between shifts in the UK and the US

In the UK, workers are entitled to 11 hours of rest between working days and a 20-minute break when they work more than 6 hours a day (gov.uk: rest breaks at work). In the US, federal law does not require meal or rest breaks and sets no daily limit on hours (U.S. Department of Labor: breaks and meal periods); some states and union contracts do. That is why the minimum rest in Shifts!H5 is a setting: 11 by default, and US users can change it or clear it to switch the check off.

The template checks rest from one day to the next: a code turns red and bold when the time between the end of yesterday's shift and the start of today's is below that setting. Practice the calculation behind it here:

Task In F2, work out the rest in hours between the end of yesterday's shift and the start of today's, rounded to 2 decimals. If yesterday's shift ends after midnight (end earlier than start), it already ends today. The formula is filled down to F6.

ABCDEF
1 Shift yesterday Start End Shift today Start Rest (hours)
2 L 14:00 22:00 E 6:00
3 N 22:00 6:00 E 6:00
4 E 6:00 14:00 L 14:00
5 N 22:00 6:00 N 22:00
6 E 6:00 14:00 N 22:00

This exercise is part of Premium.

Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.

See Premium Already Premium? Log in

The first exercise in this lesson is free.

The step from the last day of one month into the next is not checked, because the next month sits on another sheet. The template does not know your contract or state law and is not legal advice.

Common mistakes

Zeros all over the rota

INDEX on an empty pattern cell returns 0. Adding &"" at the end of the formula keeps the cell empty.

The pattern restarts every month

Using the column number inside MOD instead of the date sends every month back to day 1. Date minus pattern start keeps the rotation going.

Wrong rest after a night shift

A shift that ends after midnight already ends on the next day. Without taking off a whole day you get 24 hours too many. More on times in calculating time in Excel.

Shift rota formulas in German Excel

EnglishGerman
INDEX, MOD, ROUNDINDEX, REST, RUNDEN
SUMPRODUCT, COUNTIF, VLOOKUPSUMMENPRODUKT, ZÄHLENWENN, SVERWEIS
WEEKNUM, ISOWEEKNUM, WEEKDAYKALENDERWOCHE, ISOKALENDERWOCHE, WOCHENTAG

In German the template is called Schichtplan, with the codes F, S and N for Früh, Spät and Nacht.

Which Excel versions support this?

INDEX, MOD, SUMPRODUCT, COUNTIF, VLOOKUP, WEEKNUM, drop-down lists, conditional formatting and sheet protection work in all current versions. Microsoft lists ISOWEEKNUM for Excel 2016 and later, Microsoft 365 and Excel for Mac.

FAQ

Is the shift rota template free?

Yes, with a free account. No subscription and no payment details.

How do I set up a different shift system?

On the Shifts sheet change the pattern length and enter the codes day by day, for example a four-day pattern of early, early, late, late. Each person's offset decides where they join.

Can I plan without a fixed pattern?

Yes. Leave a person's offset empty and their row stays blank, so you pick each code from the drop-down. For pure week-by-week planning the weekly work schedule is simpler.

How do I plan the next month?

Copy the sheet (right-click the tab, Move or Copy, Create a copy) and change the month in B3. Reset cells you overwrote last month by copying an unchanged cell of the same row and pasting it. Holidays follow the year on the first sheet, so start a fresh copy of the file for January of the next year.

Does the pattern skip holidays?

No, it keeps running and holidays are only shaded. Shift work often goes on over holidays. If a holiday should be off, clear those cells or set the holiday minimum to match.

Next: the timesheet

The rota shows what is planned. The timesheet records what was actually worked, with breaks, overtime and totals past 24 hours.

Build a timesheet

More files are on the Excel templates page.

Write to us

Choose language

Select your preferred language