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
- 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
May be interested
- HOUR function - The function converts a serial number into an hour in Excelhour function: the function returns the hour value in the time value hour minute second or the date value containing the hour.
- TINV function - The function returns the inverse of the Student's t-distribution in Exceltinv function: the tinv function supports the calculation of the inverse value of the student's t-distribution associated with the student's 2-t distribution in excel.
- YEAR - The function for the value is the year of a numeric expression in Excelyear: the function returns the year of any date value, the year value is an integer between 1900 and 9999.
- AVEDEV function - The function returns the average absolute deviation of data points from their midpoint in Excelavedev function: the function returns the average absolute deviation between a given data point and the average value of the population. the function is a measure of the variability of a dataset
- DATEVALUE function - The function converts dates into numbers in Exceldatevalue function: the function converts text dates into serial numbers that excel understands
- The DAY function - The function returns the day of the day, month and year in Excelthe day function: the function takes a date value from a date value. the return value is an integer between 1 and 31.