With WEEKDAY and WEEKNUM functions in Excel, you can determine the ordinal number of a day in any given week or the ordinal number of a week in any given year. These functions are beneficial for scheduling, creating timetables, or reviewing past events.
Comparison of WEEKDAY and WEEKNUM Functions in Excel
Syntax:
- Syntax of the WEEKDAY function: WEEKDAY(serial_number, return_type)
Where:
+ serial_number represents the date expression or the number indicating the date.
+ return_type indicates the type of result returned (default is 1):
*return_type = 1: Sunday is considered as 1 (Saturday is 7).
*return_type = 2 : Monday is considered as 1 (Sunday is 7).
*return_type = 3: Monday is considered as 0 (Sunday is 6).
- Syntax of the WEEKNUM function: WEEKNUM(serial_number, return_type)
Where:
+ serial_number represents the date expression or the number indicating the date.
+ return_type indicates the type of result returned (default is 1):
*return_type = 1 : Sunday is the first day of the week.
*return_type = 2 : Monday is the first day of the week.
Function:
- The WEEKDAY function indicates the ordinal number of the day within the week.
- The WEEKNUM function reveals the ordinal number of the week within the year.
Illustrative Example
You input the date value and the return type into the spreadsheet
You enter the function into corresponding Excel cells with the parameters previously entered:
- Using the WEEKDAY function to determine the ordinal number of the day within the week. At cell C8 = WEEKDAY(C6,C7). Here is the result:
Therefore, on 30/06/2014, the day has the ordinal number 2 with the convention that Sunday is considered as 1.
- With the WEEKNUM function, you can calculate the ordinal number of the week within the year. At cell C9 =WEEKNUM(C6,C7). We obtain the result:
Thus, on 30/06/2014, it falls within week number 27 with the convention that Sunday is the first day of the week. Similarly, with other return types, you can compute your corresponding results.
Now, you should be able to distinguish between these two functions after comparing WEEKDAY and WEEKNUM in Excel, right? These functions are quite common in date calculations. By following these steps, you should grasp their functionalities and apply them effectively in your work.
