WEEKDAY Formula in Excel (Table of Contents)
WEEKDAY Formula in Excel
- MS Excel provides several inbuilt functions; one of them is the Weekday Function, which used to return 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 function to check the day of the week.
- As an 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 7, which represents the day of the week. There are two parameters – serial_number and return _type.
The Argument in the Weekday Function:
- serial_number: It’s 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, and that 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 – for 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 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, 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_Date by using the Weekday function, we have achieved the output, which is displayed in column E.
Example 2
A company owner has personal details of his employee where Employee name, Home city and Retirement Date (MM/DD/YYYY) is 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, 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 to find out the day of the week from the Retirement Date by using Weekday Formula, we have achieved the output. Here we can see the result is available between o to 6 in the E column.
Example 3
A company owner has personal details of his employee where Employee name, Home city, and Retirement Date is 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, go to sheet3 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 by using text and weekday formula 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 function to check the day of the week.
- In MS Excel, data is used to save as sequential serial numbers so they can be used in calculations; for example, 1st January 1900 saved as serial number 1 and 3rd January 2008 saved as serial number 39,450 in the MS Excel.
- If the return_type is out of range from the return_type range, then it will go through a #NUM!
- If the serial_number is out of range from the current date base, then 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 along with practical examples and a downloadable excel template. You can also go through our other suggested articles –
23 Online Courses | 9 Hands-on Projects | 110+ Hours | Verifiable Certificate of Completion
4.9
View Course
Related Courses