Course outline / Date and time functions
Lesson 39 of 75 · Intermediate · 4 exercises
Weekdays and working days
Find the day of the week, add working days, and count them.
What you'll practise
- Day of the week as a number
- Is it a weekend?
- Add working days with WORKDAY
- Count working days
Day of the week as a number
WEEKDAY returns a number for the day of the week. With 2 as the second argument, Monday is 1 and Sunday is 7, which is easy to read.
In cell D2, find the weekday number of A2, Monday = 1.
Is it a weekend?
With Monday as 1, Saturday is 6 and Sunday is 7, so a weekend day has WEEKDAY(date,2) greater than 5.
In cell D2, show "Weekend" if B2 falls on a weekend, otherwise "Weekday".
Add working days with WORKDAY
WORKDAY adds a number of working days to a date, skipping weekends.
In cell E2, find the date 10 working days after A2.
Count working days
In cell D2, count the working days from A2 to B2 with NETWORKDAYS.
Try it in a real spreadsheet
Every step checks your answer instantly and tells you exactly what to fix.