Excel tutorial
/

Functions

Intermediate

Excel WEEKDAY function: find the day of the week and spot weekends

WEEKDAY returns the day of the week as a number. return_type differences, weekend checks, day names, weekend pay and colouring a timesheet — with examples.

Plenty of calculations depend on the day of the week: weekend hours are paid extra, a delivery falling on a weekend moves to Monday, and shift schedules highlight days off.

WEEKDAY takes a date and returns the day of the week as a number. With that number, IF, CHOOSE and conditional formatting can express any rule you need.

The key subtlety is which day the week starts on. The second argument settles that.

Книга1 - Excel
—☐✕
B2fx=ДЕНЬНЕД(A2;2)
ABCDE
1DateDay no.Day nameType
210.03.20251MondayWorkday
314.03.20255FridayWorkday
415.03.20256SaturdayWeekend
516.03.20257SundayWeekend
6
Готово
return_type = 2: Monday is 1, Sunday is 7. The weekend test is then simple: day number greater than 5

Syntax

=ДЕНЬНЕД(serial_number; [return_type])

  • serial_number — a date: a cell, DATE(...) or TODAY().
  • return_type — which day the week counts from (optional):
  • 1 or omitted — Sunday = 1, Monday = 2 … Saturday = 7 (US style).
  • 2 — Monday = 1 … Sunday = 7. The most practical choice for a Monday–Friday week.
  • 3 — Monday = 0 … Sunday = 6.
  • 11–17 — the week starts on Monday … Sunday respectively (11 is the same as 2).
Книга1 - Excel
—☐✕
B4fx=ДЕНЬНЕД(A4)
ABCDE
1DateType 1Type 2Type 3
210.03.2025210
315.03.2025765
416.03.2025176
5
Готово
Monday (10.03), Saturday (15.03) and Sunday (16.03) in three types. In type 1, Sunday is 1 — the first day of the week

Entering WEEKDAY step by step

1

Select B2. Формулы → Дата и время → WEEKDAY.

Книга1 - Excel
—☐✕
ФайлГлавнаяВставкаРазметка страницыФормулыДанныеРецензированиеВидСправка
Вставить функциюАвтосуммаФинансовыеЛогическиеТекстовыеДата и времяСсылки и массивыМатематические
Библиотека функций
Диспетчер имён
Определённые имена
B2fx
ABCD
1DateDay no.
210.03.2025
314.03.2025
4
5
Готово

2

Enter A2 for Serial_number and 2 for Return_type, then click OK.

Книга1 - Excel
—☐✕
B2fx=ДЕНЬНЕД(A2;2)
ABCD
1DateDay no.
210.03.20251
314.03.2025
4
5
Готово

3

Fill the formula down. When typing by hand, Excel shows the list of types after =ДЕНЬНЕД(A2; — pick one with the arrow keys and press Tab.

Книга1 - Excel
—☐✕
D3fx=B3*C3*ЕСЛИ(ДЕНЬНЕД(A3;2)>5;1,5;1)
ABCDE
1DateHoursRatePay
214.03.2025830 000240 000
315.03.2025630 000270 000
416.03.2025430 000180 000
517.03.2025830 000240 000
6
Готово
Example 1: weekend hours are paid ×1.5. Saturday, 6 hours: 6 × 30,000 × 1.5 = 270,000 sum
Книга1 - Excel
—☐✕
D2fx=A2+8-ДЕНЬНЕД(A2;2)
ABCDE
1OrderDay no.Move to workdayNext Monday
214.03.2025514.03.202517.03.2025
315.03.2025617.03.202517.03.2025
416.03.2025717.03.202517.03.2025
5
Готово
Example 2: Friday stays a workday, Saturday and Sunday move to Monday. A2+8-WEEKDAY(A2,2) always gives the next Monday

Pro level: weekly reports and colouring a timesheet

  • Week start (Monday): =A2-ДЕНЬНЕД(A2;2)+1 — a helper column for grouping sales by week.
  • Highlight weekends: Главная → Условное форматирование → New Rule → “Use a formula…” → =ДЕНЬНЕД($A2;2)>5. The dollar sign locks the column so the whole row is coloured.
  • Number of Mondays in a month: =СУММПРОИЗВ(--(ДЕНЬНЕД(A2:A31;2)=1)).
  • Six-day week: if only Sunday is off, the test is =ДЕНЬНЕД(A2;2)=7.
  • Need the week number? Use WEEKNUM(A2,2) or ISO-style ISOWEEKNUM(A2).
Книга1 - Excel
—☐✕
ФайлГлавнаяВставкаРазметка страницыФормулыДанныеРецензированиеВидСправка
Вставить
Буфер обмена
Calibri ▾11 ▾
Шрифт
Выравнивание
Общий ▾
Число
Условное форматированиеФорматировать как таблицуСтили ячеек
Стили
ВставитьУдалитьФормат
Ячейки
АвтосуммаСортировка и фильтрНайти и выделить
Редактирование
A2fx45729
ABCD
1DateDayHours
213.03.2025Thu8
314.03.2025Fri8
415.03.2025Sat5
516.03.2025Sun0
617.03.2025Mon8
7
ГотовоСреднее: 22868,4Количество: 15Сумма: 228684
Timesheet: the rule =ДЕНЬНЕД($A2;2)>5 coloured the Saturday and Sunday rows automatically. Change a date and the colour follows

Try it in the simulator

Type =ДЕНЬНЕД(A2;2) in B2 and =ЕСЛИ(B2>5;"Weekend";"Workday") in C2, then fill both down to row 5. Which dates fall on a weekend?

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1DateDay no.Type
245730
345731
445732
545733
6
7
8
9
10
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

122 / 154