Excel WEEKNUM() function
WEEKNUM() function
This function is used to return the week number of a specific date. For example, the week containing January 1 is the first week of the year and is numbered week 1.
Two systems have been used for this function:
- The 1st one is System 1 The week containing January 1 is the first week of the year, and is numbered week 1.
- and the 2nd one is System 2 The week containing the first Thursday of the year is the first week of the year and is numbered as week 1. This system is the methodology specified in ISO 8601, which is commonly known as the European week numbering system.
Version : Excel 2013
Syntax:
WEEKNUM(serial_number,[return_type])
Parameters
Name | Description | Data Type | Required/ Optional |
---|---|---|---|
Serial_number | A sequential number that represents the date of the day you are trying to find. | Date | Required |
Return_type | A number that determines the type of return value. | Number | Optional |
Here is a table below show that, a number that determines on which day the week begins. The default is 1.
Return_type | Week begins on | System |
---|---|---|
1 or omitted | Sunday | 1 |
2 | Monday | 1 |
11 | Monday | 1 |
12 | Tuesday | 1 |
13 | Wednesday | 1 |
14 | Thursday | 1 |
15 | Friday | 1 |
16 | Saturday | 1 |
17 | Sunday | 1 |
21 | Monday | 2 |
Remarks:
- Excel stores date as sequential serial numbers so they can be used in calculations. By default, January 1, 1900, is serial number 1. January 1, 2010, is serial number 40179 because it is 40178 days after January 1, 1900.
- when Serial_number is out of range for the current date base value, a #NUM! error is returned.
- when Return_type is out of the range specified in the table above, a #NUM! error is returned.
Example - 1:
The example below returns the number of the week in the year that 4/20/2012 occurs, based on weeks beginning on Sunday (default).
Example - 2:
The example below returns the number of the week in the year that 4/20/2012 occurs, based on a week beginning on Monday ( 2).
Previous: Excel WEEKDAY() function
Next:
Excel WORKDAY() function
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://w3resource.com/excel/excel-weeknum-function.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics