MS Excel: WEEKDAY function determine the day of the week from any date
- Fakhriddinbek

- May 4
- 2 min read
The WEEKDAY function in Excel returns a number representing the day of the week for a given date. It's a vital tool in scheduling, reporting, task management, and conditional formatting, especially when you need to identify weekends or group data by weekdays.
For example, if you want to filter out weekends or flag deadlines that fall on Mondays, WEEKDAY makes it possible with just one formula.

Syntax
=WEEKDAY(serial_number, [return_type])
Arguments:
Return Type Options
Examples
Example 1: Basic Weekday Calculation
=WEEKDAY(DATE(2025,5,4))
Result: 1(If return_type is omitted, Excel assumes Sunday = 1)
Example 2: Weekday Starting from Monday
=WEEKDAY("04/05/2025", 2)
Result: 7(May 4, 2025 is a Sunday; 2 makes Monday = 1)
Example 3: Use with IF to Flag Weekends
=IF(WEEKDAY(A2, 2) > 5, "Weekend", "Weekday")
Flags any Saturday (6) or Sunday (7) as "Weekend".
Sample Table
Notes
Excel stores dates as serial numbers starting from January 1, 1900 (serial number 1).
If the input date is invalid, WEEKDAY returns a #VALUE! error.
Use TEXT(date, "dddd") to return the full name of the weekday instead of a number.
Related Functions
Summary Table
Conclusion
The WEEKDAY function is indispensable for time-based analysis in Excel. It helps you quickly evaluate the day of the week, automate logic for weekends, and build smarter date-aware systems. With its flexible return types, you can match any calendar model you need.



Comments