WHAT IS WEEKDAY FUNCTION IN MICROSOFT EXCEL?
WEEKDAY function in Microsoft Excel, helps us to find the day number of the week corresponding to a date. By default, the return value is between 1 (Sunday) to 7 (Saturday) .
SYNTAX OF WEEKDAY FUNCTION
WEEKDAY function has 2 functional arguments
- serial number is required and return type is optional
- Return type is built-in list, we can select return type argument depends on our requirement.
- If return type or serial number is invalid selection then #NUM! error will return in cell.
- If we didn’t select return type then return type argument value will be treated as 1 and below are the values will be return.
- for Sunday return value will be 1
- Monday = 2, Tuesday=3…. Saturday=7
(Check out the below video to learn more about WEEKDAY function in Microsoft Excel).
EXAMPLES OF WEEKDAY FUNCTION
|1||In cell A1 enter date as 03/30/2020, and write formula||=WEEEKDAY(A1)||2 (selected date day is Monday , and return type is 1)|
|2||In cell A1 enter date as 03/30/2020, select return type 2 as like in formula||=WEEKDAY(A1,2)||1 (selected date day is Monday , and return type is 2)|
|3||In cell A1 enter date as 03/30/2020, select return type 3 as like in formula||=WEEKDAY(A1,3)||0 (selected date day is Monday , and return type is 3)|
TIPS & TRICKS:
- Weekday function in excel is very powerful, and we can use in many ways. For example, if we have a requirement that we have a worksheet with all the dates in that month and needs to be highlighted only work days (Monday to Friday). For this we need to use weekday function in conditional formatting custom rules [refer above video for how to create this to solve this problem].
- We can use this function for calculations , customized templates , automatic reports generation, inventory etc.