WEEKNUM

Function Reference: WEEKNUM

Syntax
=WEEKNUM(serial_number,[return_type])
Syntax
Returns the week number for a date using a range of methods for calculating which is the first week in the year.
Arguments
Name Type Description
serial_number number A constant, reference or nested expression which provides the serial date number for which the week number is to be calculated.
[return_type] number An optional constant, reference or nested expression which indicates which method is to be used to calculate the first week of the year.  Defaults to 1 if omitted
1 The first week is the week containing January 1, with the weeks running Sunday to Saturday.- US Standard
2 The first week is the week containing January 1, with the weeks running Monday to Sunday
11 The first week is the week containing January 1, with the weeks running Monday to Sunday - same as return_type 2
12 The first week is the week containing January 1, with the weeks running Tuesday to Monday
13 The first week is the week containing January 1, with the weeks running Wednesday to Tuesday
14 The first week is the week containing January 1, with the weeks running Thursday to Wednesday
15 The first week is the week containing January 1, with the weeks running Friday to Thursday
17 The first week is the week containing January 1, with the weeks running Saturday to Sunday - same as return_type 1
21 The first week is the week with the first Thursday, with weeks running Monday to Saturday - European Standard - same as ISO method
Return Values
Type Specific Value Description
number   The week number in which the date falls, based on the return_type selected.
error #VALUE! If value passed to serial_number or return_type is not a number and cannot be coerced to a number.
arror #NUM! If the value passed to serial_number is outside the he range allowed.
1900 date system: 0 to 2,958,465
1904 date system: 0 to 2,957003
error   Any errors referenced by arguments are returned due to propagation of error values.
Notes / Comments / Advice / Warnings
Note: This function was added to Excel in Excel 2016.
Comment: ISOWEEKNUM or WEEKNUM with return_type 21 returns week numbers that will always have 7 days.  Three years will have 52 weeks and the fourth, 53 weeks.  Weeks at the beginning and ending of a year calculated with this method will commonly have days from the previous or following year included in them.
Advice: We recommend using this function rather than WEEKNUM for calculating week numbers, as it is standardised and will avoid any confusion in B2B transaction.
Examples: Open / download sample workbook: ISOWEEKNUM, WEEKNUM.xlsx