Updated June 7, 2023
WEEKDAY Formula in Excel
- MS Excel provides several inbuilt functions; one is the Weekday Function, which returns an integer value from 0 to 7, where 0 will return in return_type 3. It will find out the day of the week from the given date by the user. It belongs to the Date/Time function category in Excel. By default, it will return 1 for Sunday as the first day of the week and 7 for Saturday. A user can use this weekday function with other Excel functions to check the day of the week.
- For example, if a user is given a date of 22nd May 2019 as input on the weekday, it will return 4 as output because it will take Sunday as the first day of the week.
Syntax of the WEEKDAY Function:
WEEKDAY() – It will return an integer value from 0 to representing the week’s dayre two parameters – serial_number and return _type.
The Argument in the Weekday Function:
- serial_number: It is a mandatory parameter from where a user wants to get the day of the week.
- return_type: It is an optional parameter; if a user didn’t pass any value for this, then by default, it will take 1, which will be Sunday.
Following are the value for return_type:
- 1 – for Sunday as 1 and 7 will be Saturday (it is by default)
- 2 – for Monday as 1 and 7 will be Sunday
- 3 – for Monday as 0 and 6 will be Sunday
- 11 – for Monday as 1 and 7 will be Sunday
- 12- for Tuesday as 1 and 7 will be Monday
- 13 – for Wednesday as 1 and 7 will be Tuesday
- 14 – for Thursday as 1 and 7 will be Wednesday
- 15 – for Friday as 1 and 7 will be Thursday
- 16 – Saturday as 1 and 7 will be Saturday
- 17 – for Sunday as 1 and 7 will be Saturday
How to Use WEEKDAY Formula in Excel?
WEEKDAY Formula in Excel is very simple and easy. Let’s understand how to use the WEEKDAY Formula in Excel with some examples.
Example 1
A shopkeeper has some products with an Expiry Date of 04/04/2019 (MM/DD/YYYY) on them. He wants to get the day of that week. Let’s see how the Weekday function can solve his problem.
Open MS Excel and go to sheet1, where the user wants to display the day of that week.
Create one Column Header for the Day of the Week to show the function result in the column.
Click on cell D2 and apply the WEEKDAY Formula.
Now it will ask for serial_number; select the Expiry Date from where the shopkeeper wants to see the day of the week, which is available in C2.
Now it will ask for return_type. Here, the user wants to use by default value, which is 1, or the user can omit this argument.
Press on the Enter Button and see the result shown below.
Apply the same formula to the other cell. Drag cells D2 to D13.
Summary of Example 1:
As the shopkeeper wants to find out the week from the Expiry_Dausing the Weekday function, we have achieved the out displayed in column E.
Example 2
A company owner has personal details of his employee where the Employee’s name, Home city, and Retirement Date (MM/DD/YYYY) are given. He wants to get the day of that week for the Retirement Date.
Let’s see how the Weekday function can solve his problem.
Open MS Excel, and go to sheet2, where the user wants to display the day of that week from the Retirement Date.
Create one Column Header for the Day of the Week to show the function result in column E.
Click on cell E2 and apply the WEEKDAY Formula.
Now it will ask for serial_number, select the retirement date from where a company owner wants to see the day of the week, which is available in cell D2.
Now it will ask for return_type; here, the user wants to use return type 3, which the user can select from the return type pop-up.
Press on the Enter Button and see the result shown below.
Apply the same Formula to the other Cell of the E Column and Drag the cells E2 to E13.
Summary of Example 2:
As the company owner wants detdeterminet the day of the week from the Retirement Dausing thusing the Weekday Formula, we have achieved the output. The result is available between o to 6 in the E column.
Example 3
A company owner has the personal details of his employee where the Employee’s name, Home city, and Retirement Date are given. He wants to get the day of that week for the Retirement Date in text format.
Let’s see how the Weekday function can solve his problem.
Open MS Excel and go to sheet 3, where the user wants to display the day of that week from the Retirement Date.
Create One Column Header for the Day of the Week to show the function result in Column E.
Click on cell E2 cell and apply Text Formula.
Write the Weekday Formula in cell E2.
Now it will ask for serial_number and the return type.
Now it will ask for the format of the text formula, so give “DDDD”.
Press on the Enter Button.
Apply the same formula to the other cell of the E column; drag the cells E2 to E13.
Summary of Example 3:
As the company owner wants to find out the day in the text format, we have achieved this by using the text and weekday formulas together.
Things to Remember About WEEKDAY Formula in Excel
- The serial_number in the weekday function must be a date value that can be passed with the data function or any other formula that results come as a date.
- The weekday function will return an integer value from 0 to 7, where 0 will return in return_type 3.
- By default, it will return 1 for Sunday as the first day of the week and 7 for Saturday. A user can use this weekday function with other Excel functions to check the day of the week.
- In MS Excel, data is saved as sequential serial numbers for calculations; for example, 1st January 1900 was saved as serial number 1, and 3rd January 2008 was saved as serial number 39,450 in MS Excel.
- If the return_type is out of range from the return_type range, it will go through a #NUM!
- If the serial number is out of range from the current date base, it will go through a #NUM!
Recommended Articles
This has been a guide to WEEKDAY Formula in Excel. Here we discuss How to use WEEKDAY Formula in Excel, practical examples, and a downloadable Excel template. You can also go through our other suggested articles –