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.

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.

Compare WEEKDAY and WEEKNUM functions in Excel Picture 1Compare WEEKDAY and WEEKNUM functions in Excel Picture 1

- Calculate what day 6/15/2016 is the weekday.

In the cell to calculate enter the formula: = WEEKDAY (D6, D7) .

Compare WEEKDAY and WEEKNUM functions in Excel Picture 2Compare WEEKDAY and WEEKNUM functions in Excel Picture 2

Press Enter -> result on 6/15/2016 is the 4th day of the week.

Compare WEEKDAY and WEEKNUM functions in Excel Picture 3Compare WEEKDAY and WEEKNUM functions in Excel Picture 3

- 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) .

Compare WEEKDAY and WEEKNUM functions in Excel Picture 4Compare WEEKDAY and WEEKNUM functions in Excel Picture 4

Press Enter -> 6/15/2016 at the 25th week of 2016.

Compare WEEKDAY and WEEKNUM functions in Excel Picture 5Compare WEEKDAY and WEEKNUM functions in Excel Picture 5

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!

3.9 ★ | 18 Vote