What is the use of Excel WEEKDAY Function?
Use Excel WEEKDAY Function to get weekday number of a day for a serial number which is a represent a valid date you have supplied. In simple words, it will return day number ranging from 1 to 7 in a week.
Syntax for Excel WEEKDAY Function
serial_number A serial number which represents the date as per excel’s date system.
return_type A number to specify starting & ending day of the week to consider while getting day number.
You can use different numbers to use in as return_type as per below table.
|1||Numbers 1 (Sunday) through 7 (Saturday).|
|2||Numbers 1 (Monday) through 7 (Sunday).|
|3||Numbers 0 (Monday) through 6 (Sunday).|
|11||Numbers 1 (Monday) through 7 (Sunday).|
|12||Numbers 1 (Tuesday) through 7 (Monday).|
|13||Numbers 1 (Wednesday) through 7 (Tuesday).|
|14||Numbers 1 (Thursday) through 7 (Wednesday).|
|15||Numbers 1 (Friday) through 7 (Thursday).|
|16||Numbers 1 (Saturday) through 7 (Friday).|
|17||Numbers 1 (Sunday) through 7 (Saturday).|
More Information on Excel WEEKDAY Function
- You can also use a date which is in textual form, a result of another function, or you can enter a date directly into the function by using double quotation marks.
- If you skip specifying return type it will take 1 as default.
Examples to understand Excel WEEKDAY Function
In above example, I have used Weekday function with TODAY function to get dynamic weekday. It will give you the weekday whenever current date changes. You can use this method in your dashboards to trigger some values when needs to change when weekday change.
In above example, I have used Weekday with IF Function to create a formula which first check weekday of a date and return “Weekday” or “Weekend” basis on the value return from Weekday function.
Download Sample File
Use Excel Weekday Function to get the number of the day from a week. Learn more about WEEKDAY from here.