Ever found yourself needing to display the week number of a date in Google Sheets? Week numbers can be a helpful reference, especially when dealing with date ranges or tracking tasks across weeks. Google Sheets provides a handy formula to accomplish this: WEEKNUM().

Let's delve into how this formula works and explore some practical use cases.

Understanding the WEEKNUM() Formula
The WEEKNUM() function returns the week number for a specified date, based on the week number's starting day and whether the returned number should be a year-derived or calendar week number.

The basic syntax is: WEEKNUM(start_date, [return_type], [ Week_start])
Format of start_date

The start_date argument is required and must be a date value. You can either enter a date as text (e.g., "2022-01-01") or reference a cell containing a date (e.g., A1).
For instance, to get the week number for January 1, 2022, you can use "2022-01-01" as the start_date argument.
Return Types and Week Start

The return_type and Week_start arguments are optional. Return_type determines the week numbering type, while Week_start sets the day of the week on which the week should start.
Return_type can be one of the following:
1- Year-derived week number (where weeks start on the first day of the year).2- ISO week number (where weeks start on a Monday and follow the international standard ISO 8601).11- Calendar week number (where the first week of the year may contain days from the previous year).22- ISO calendar week number (where weeks start on a Monday and follow the international standard ISO 8601).

The default Week_start value is Sunday, but you can change this to any valid day number (1-7, where 1 is Sunday and 7 is Saturday).
Applying WEEKNUM() in Google Sheets






Now that we understand how WEEKNUM() works, let's look at a few practical examples.
Suppose you have a list of dates in Column A, starting from A2 with the date "2022-01-01" in A2, and you want to calculate the week number for each date.
Calculating Year-derived Week Numbers
Enter the following formula in cell B2 to calculate the year-derived week number for January 1, 2022: =WEEKNUM(A2)
Then drag this formula down to copy it for the rest of the dates. You'll notice that weeks start on January 1 and end on December 31.
Calculating ISO Week Numbers
To calculate ISO week numbers, where weeks start on a Monday, enter the formula =WEEKNUM(A2, 2) in cell B2 and drag down.
This will give you week numbers following the international standard ISO 8601, with the first week of the year containing at least four days.
For more complex use cases, you can combine WEEKNUM() with other formulas or functions to extract specific information from your dates. For instance, you can use TEXT() to extract the year from a date, or FIND() to locate the position of a weekday in a date.
Google Sheets' WEEKNUM() formula offers a powerful way to extract week numbers from dates, making it easier to organize, analyze, and present data based on weeks instead of months or years. Keep exploring the endless possibilities of Google Sheets functions!