Class timetable template in Excel: subjects, colors and times

A school timetable looks simple until a break moves or a subject gets renamed. In this template the times come from a period table, subjects come from a list with fixed colors, and Excel counts the lessons per subject. Below you also learn how to build it.

In short: rows are the periods from a period table (a number is a lesson, text is a break), columns are Monday to Friday. You pick each subject from a drop-down, and conditional formatting colors it by its row in the subject list. COUNTIF counts the lessons per subject each week, and INDEX with MATCH fetches times from a table that includes breaks.

You should know: COUNTIF and mixed references such as G$2. INDEX with MATCH is explained in the second exercise.

Try it now

How many lessons of English, math or PE does the class have each week? One formula, filled down, counts them all.

Task How many lessons a week does the class have in each subject? In I2, count how often the subject in H2 appears in the timetable B2:F7. The formula is filled into I2:I7.

ABCDEFGHI
1 Period Mon Tue Wed Thu Fri Subject Per week
2 1 English Math Science History English English
3 2 English Math Science PE Math Math
4 3 Math Science English PE History Science
5 4 Science History English Math Art History
6 5 Art English Math Science Art PE
7 6 PE Art

Download the class timetable template

The workbook has three sheets: the timetable on one landscape Letter page, a Subjects and times sheet with 12 subjects (teacher and room) and 12 rows for periods and breaks, and instructions. On the timetable only the subject cells and the header are editable; times and lesson counts calculate themselves. The sample has six one-hour periods with a morning break and lunch. The wording works for schools in the US and the UK: periods, break and lunch, PE and computer science. Change every time in the period table.

Preview of the class timetable in Excel: Monday to Friday with period, start and end times from the period table, subjects in color, breaks in grey and lessons per week for each subject on the rightEnlarge preview

Download the finished template

The finished Excel file class-timetable-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

How the timetable is laid out

ColumnContentFormula in row 5
APeriod=IF('Subjects and times'!G5="","",'Subjects and times'!G5)
B, CStart, endthe same with columns H and I of the period table
D to HMonday to Fridaydrop-down with the source ='Subjects and times'!$A$5:$A$16
JSubjectfrom the subject list
KPer week=COUNTIF($D$5:$H$16,J5)

The period table lines up row by row with the timetable: row 5 of the timetable is row 5 of the table, so a plain reference does the job. A number in the Period column means a lesson; text such as Break or Lunch turns the whole row grey through the rule =AND($A5<>"",NOT(ISNUMBER($A5))). The drop-down list makes sure every subject is spelled exactly as on the list.

Color-coded subjects

Each row of the subject list has a fixed color. For each row there is one conditional formatting rule on the timetable, for example =AND(D5<>"",D5='Subjects and times'!$A$5) with the fill color of English. With no dollar signs on D5 the reference moves across the whole timetable, while the subject cell stays fixed. Rename a subject and it keeps its color, because the rule only looks at the row. The subject list shows each color as its background, so you can see which color belongs to which subject.

Times from the period table

If you type the times into every row, one change means editing the whole timetable. A table with period, start and end, breaks included, is better. With breaks in between, though, period 3 is not row 3. INDEX and MATCH find the right row:

Task The times on the timetable should come from the period table in F1:H9, which also holds the breaks. In B2, fetch the start of the period in A2. The formula is filled into B2:C7, so column C gets the end time.

ABCDEFGH
1 Period Start End Monday Period Start End
2 1 English 1 8:00 8:45
3 2 English 2 8:50 9:35
4 3 Math Break 9:35 9:55
5 4 Science 3 9:55 10:40
6 5 Art 4 10:45 11:30
7 6 Art Break 11:30 11:45
8 5 11:45 12:30
9 6 12:35 13:20

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 template does not need this, because the timetable and the period table share their rows. As soon as you build a timetable for one teacher or one group where not every period appears, INDEX with MATCH is the safe way.

Counting lessons per week

COUNTIF counts how often a subject appears in D5:H16, and the total below shows all lessons in the week. The "not on the list" row works out =COUNTA(D5:H16)-K17: if it is above 0, the timetable contains a subject spelled differently from the list, and the cell turns red.

Common mistakes

Times typed as text

"8.45" with a period is not a time for Excel. Type times with a colon, such as 8:45. The period table only accepts times and shows the minutes of each period as a check.

A space after the subject

COUNTIF does not count "Science " with a trailing space as Science. With the drop-down that cannot happen.

Subjects in break rows

If you put a subject in a break row, it counts as a lesson. Keep break rows empty and use a lesson row for clubs or homeroom.

Coloring cells by hand

A cell you color by hand keeps its color when you change the subject. Conditional formatting always matches.

Timetable formulas in German Excel

In German the template is called Stundenplan, with 45-minute lessons (Stunden) and breaks (Pausen), the usual pattern in German schools.

EnglishGerman
COUNTIF, COUNTAZÄHLENWENN, ANZAHL2
INDEX, MATCHINDEX, VERGLEICH
IF, AND, NOT, ISNUMBERWENN, UND, NICHT, ISTZAHL

German Excel separates arguments with a semicolon: =ZÄHLENWENN($D$5:$H$16;J5).

Which Excel versions support this?

COUNTIF, INDEX, MATCH, drop-down lists, conditional formatting and sheet protection work in all current Excel versions, including Excel for Mac and Excel for the web. The template needs no Microsoft 365 functions.

FAQ

Is the class timetable template free?

Yes. Download the Excel file with a free account, with no subscription and no payment details.

Can I plan a two-week timetable (week A and week B)?

Yes: copy the sheet (right-click the sheet tab, Move or Copy, Create a copy) and name the copy Week B. Both use the same subject list and times.

Does it work for teachers?

Yes. Enter classes instead of subjects, such as "7B Math", or add entries like that to the subject list. For grades, see Excel for teachers and the gradebook template.

Can I show times as AM and PM?

Yes. Unprotect the Subjects and times sheet and the timetable, select the time cells and choose a time format with AM/PM under Format Cells.

How many subjects and periods fit?

12 subjects and 12 rows for periods and breaks. For more, unprotect the sheet and extend the list, the timetable and the ranges in the formulas.

Next: weekly schedule with time slots

For appointments rather than subjects: seven days in 30-minute slots, colored by category.

Go to the weekly schedule

Every template with a build guide: Excel templates.

Write to us

Choose language

Select your preferred language