Compare WEEKDAY and WEEKNUM functions in Excel
The following article helps you clearly distinguish the meaning and usage between 2 functions WEEKDAY and WEEKNUM in Excel.
1. About meaning:
- Same: Both functions return sequence numbers.
- Different:
+ WEEKDAY function shows the number of the day of the week.
+ WEEKNUM function shows the ordinal number of the week of the year.
+ Return value:
* The WEEKDAY function is in the file {1, 2, 3, 4, 5, 6, 7}.
* The WEEKNUM function is greater than the value of the WEEKDAY function corresponding to the total number of weeks in the year.
2. Regarding the syntax:
2.1. WEEKDAY function
Syntax : WEEKDAY (serial_number, [return_type]) .
Inside:
- serial_number : is a sequence number representing the date to determine the day of the week, is a required parameter.
- return_type : is a number used to determine the type of return value, is an optional parameter, the default is 1, with the following values:
+ return_type = 1 or skip : Value from 1 (Sunday) to 7 (Saturday).
+ return_type = 2 : The number from 1 (Monday) to 7 (Sunday).
+ return_type = 3 : A number from 1 (Monday) to 7 (Sunday).
+ return_type = 11 : Number from 1 (Monday) to 7 (Sunday).
+ return_type = 12 : The number from 1 (Tuesday) to 7 (Monday).
+ return_type = 13 : The number from 1 (Wednesday) to 7 (Tuesday).
+ return_type = 14 : A number from 1 (Thursday) to 7 (Wednesday).
+ return_type = 15 : The number from 1 (Friday) to 7 (Thursday).
+ return_type = 16 : A number from 1 (Saturday) to 7 (Friday).
+ return_type = 17 : A number from 1 (Sunday) to 7 (Saturday).
2.2. WEEKNUM function
Syntax : WEEKNUM (serial_number, [return_type]) .
Inside:
- serial_number : A day of the week, is a required parameter.
- return_type : A number to determine the week starting from, the default value is 1 with the following values:
+ return_type = 1 or skip -> the week starts on Sunday and the value = 1.
+ return_type = 2 -> week starts on Monday and value = 1.
+ return_type = 11 -> week starting on Monday and value = 1.
+ return_type = 12 -> week starting on the 3rd and value = 1.
+ return_type = 13 -> week starts on the 4th and value = 1.
+ return_type = 14 -> week starts on Thursday and value = 1.
+ return_type = 15 -> week starts on Friday and value = 1.
+ return_type = 16 -> week starts on Saturday and value = 1.
+ return_type = 17 -> week starting on Sunday and value = 1.
+ return_type = 21 -> week starts on Monday and value = 2.
Thus, the number of parameters of the two functions are the same but different in the parameters and return values.
3. For example:
Calculates the date 6/15/2016 and what day is in the week of the year.
- Calculate what day 6/15/2016 is the weekday.
In the cell to calculate enter the formula: = WEEKDAY (D6, D7) .
Press Enter -> result on 6/15/2016 is the 4th day of the week.
- Calculated on how many days of the year 6/15/2016 is in the year.
In the cell to calculate enter the formula: = WEEKNUM (D6, D7) .
Press Enter -> 6/15/2016 at the 25th week of 2016.
So with the same day using the 2 functions WEEKNUM and WEEKDAY will determine what day that day is in the week and how many days it is in the year.
Above is a comparison between the similarities and differences between 2 functions WEEKNUM and WEEKDAY hope to help you.
Good luck!
You should read it
- WEEKDAY function - The function returns the weekday of a corresponding date in Excel
- Summary of trigonometric functions in Excel
- Compare ODDFPRICE and ODDLPRICE functions in Excel
- Compare ROUND, ROUNDUP and ROUNDDOWN rounding functions in Excel
- How to fix the SUM function doesn't add up in Excel
- Complete financial functions in Excel you should know
- MS Excel - Lesson 5: Excel formulas and functions
- Office 365 has officially added the XLOOKUP function for Excel
- Summary of information functions in Excel
- WEEKNUM function - The function returns the week number of the year in Excel
- How to compare 2 Excel files to see if there is any difference
- Comparison functions in Excel - How to use comparison functions and examples using comparison functions
Maybe you are interested
10 Apple Products That Could Be Discontinued Next Week
Will Bitcoin Price Fall Below $60K This Week?
Bitcoin closed in the red for the second week and was the direct cause of the recent market correction
Samsung confirmed the Galaxy Ring will launch at MWC this week
Google will release weekly security updates for Chrome
How many weeks, days, hours, minutes, seconds are there in a year?