WEEKNUM

WEEKNUM(serial_num [,return_type])

Returns the week number in the year for a given date (based on US convention).

serial_numThe date within the week.
return_type(Optional) The number that specifies on what day the week begins:
1 = Sunday (default)
2 = Monday
11 = Monday (1 to 7)
12 = Tuesday (1 to 7)
13 = Wednesday (1 to 7)
14 = Thursday (1 to 7)
15 = Friday (1 to 7)
16 = Saturday (1 to 7)
17 = Sunday (1 to 7)
21 = Monday (1 to 7) European convention

REMARKS
* This function returns a number between 1 and 54.
* This function returns the week number according to the US convention.
* All weeks start on a Sunday and week number 1 is assigned to the week containing January 1st.
* The last week number in a year is usually 53, although some will return 54.
* If "return_type" is left blank, then 1 is used.
* If "return_type" = 1, the week starts on a Sunday and the weekdays are numbered Sunday = 1 to Saturday = 7.
* If "return_type" = 2, the week starts on a Monday and the weekdays are numbered Monday = 1 to Sunday = 7.
* If "return_type" = 21, then the weekdays according to the European convention are returned.
* If "return_type" = 21, then the first week of the year is the first week that contains at least 4 days (which means it must contain a Thursday).
* If "return_type" = 21, then this is equivalent to using the ISOWEEKNUM function.
* You can use the DATE function to return the date serial number given a year, month, day.
* You can use the DATEVALUE function to return the date serial number given a date in text format.
* You can use the ISOWEEKNUM function to return the week number in the year for a given date (based on European convention).
* You can use the WEEKDAY function to return the day of the week.
* You can use the WEEKNUMBER - User Defined Function if you want to use a VBA function.
* For the Microsoft documentation refer to support.microsoft.com

 AB
1=WEEKNUM("1 Jan 2020") = 1Wed, 1 Jan 2020
2=WEEKNUM("1 Jan 2021") = 1Fri, 1 Jan 2021
3=WEEKNUM("1 Jan 2022") = 1Sat, 1 Jan 2022
4=WEEKNUM("1 Jan 2023") = 1Sun, 1 Jan 2023
5=WEEKNUM("1 Jan 2024") = 1Mon, 1 Jan 2024
6=WEEKNUM("31 Dec 2020") = 53Thu, 31 Dec 2020
7=WEEKNUM("31 Dec 2021") = 53Fri, 31 Dec 2021
8=WEEKNUM("31 Dec 2022") = 53Sat, 31 Dec 2022
9=WEEKNUM("31 Dec 2023") = 53Sun, 31 Dec 2023
10=WEEKNUM("31 Dec 2024") = 53Tue, 31 Dec 2024
11=WEEKNUM(TODAY(),30) = #NUM! 
12=WEEKNUM(invalid_namedrange) = #NAME? 

1 - What is the week number for 1 Jan 2020.
2 - What is the week number for 1 Jan 2021.
3 - What is the week number for 1 Jan 2022.
4 - What is the week number for 1 Jan 2023.
5 - What is the week number for 1 Jan 2024.
6 - What is the week number for 31 Dec 2020.
7 - What is the week number for 31 Dec 2021.
8 - What is the week number for 31 Dec 2022.
9 - What is the week number for 31 Dec 2023.
10 - What is the week number for 31 Dec 2024.
11 - If the return_type is not a valid number, #NUM! is returned.
12 - If a named range is invalid, #NAME? is retrurned.

© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited Top