Weekend or weekday
PremiumIn B2, show "Weekend" if the date in A2 falls on a Saturday or Sunday and "Weekday" if not. With WEEKDAY(A2,2), Monday is 1, so the weekend is anything over 5.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Shift date | Day type | ||||
| 2 | Mar 16, 2024 | |||||
| 3 | Mar 15, 2024 | |||||
| 4 | Mar 17, 2024 | |||||
| 5 | Mar 18, 2024 | |||||
| 6 | ||||||
| 7 | ||||||
| 8 |
Premium lesson
Unlock Week numbers and weekends and every other lesson
This is a premium lesson. Premium lets you solve it and every other lesson, take the timed mock tests, and earn certificates you can share on LinkedIn.
Why this works
WEEKDAY(A2,2) numbers the days from Monday = 1 to Sunday = 7, so Saturday and Sunday are the only days above 5. Mar 16, 2024 is a Saturday, 6, so the answer is Weekend. Filled down, Friday shows Weekday and Sunday Weekend.
Common mistake: Leaving out the 2 in WEEKDAY. The week then starts on Sunday as 1, and >5 flags Friday and Saturday instead of the weekend.
The answer
- B2
=IF(1WEEKDAY(A2,2)>5,2"Weekend",3"Weekday")
In plain words: 1If the date in A2 is day 6 or 7 of the week, counting Monday as 1, 2show Weekend. 3Otherwise show Weekday.