Google Sheets WEEKNUM Function
This post will guide you how to use Google Sheets WEEKNUM function with syntax and examples.
Table of Contents
The Google Sheets WEEKNUM function returns the week number of a specific date, and the returned value is ranging from 1 to 53. And this function will start to count the week number from January 1 and the Sunday is the first day in one week by default.
The WEEKNUM function can be used to get a number representing the week of the year where the provided date falls in google sheets. The purpose of this function is to get the week number for a given date and it will return a number between 1 and 54.
The WEEKNUM function is a build-in function in Google Sheets and it is categorized as a Date function.
The syntax of the WEEKNUM function is as below:
Where the WEEKNUM function arguments is:
- Serial_number –This is a required argument. A date that you want to get the week number. The dates should be typed by the DATE function to make sure it is a valid date. For example, use DATE(2021,3,20) to pass into the WEEKNUM function and then it will return the week number.
- return_type – This is an optional argument. A number that determines the first day of the week for the year, the default value is 1.
|Return_type||Week begins on||System|
|1 or omitted||Sunday||1|
- If serial_number is out of range for the current date base value, a #NUM! Error is returned.
- If return_type is out of the range specified in the table above, a #NUM! Error is returned.
- A serial date is how the google sheets stores dates and it represents the number of days since 1900-01-01, so the January 1, 1900 date is serial number 1 by default.
Google Sheets WEEKNUM Function Examples
The below examples will show you how to use google sheets WEEKNUM Function to return the week number from a date.
1# get number of the week from a date value 2021/03/20, enter the following formula in Cell B1.