Navigating Through Weeks with WEEKDAY and WEEKNUM Functions in Google Sheets

Google Sheets Tips
Pivots & Charts

Are you looking to enhance your ability to organize and analyze time-based data in Google Sheets? The WEEKDAY and WEEKNUM functions are invaluable for anyone who needs to manage schedules, deadlines, or handle week-based data analysis.

WEEKDAY helps you identify the day of the week for any given date – a tool crucial for planning weekly activities or recurring events. Similarly, WEEKNUM allows you to define the week number of a date within the year, which is perfect for tracking project timelines or understanding seasonal trends.

As part of our comprehensive series on Google Sheets Day functions, this article will guide you through effective ways to use these functions to streamline your workflow and improve data organization and insight.

WEEKDAY and WEEKNUM Functions: Application and Benefits

The WEEKDAY and WEEKNUM functions in Google Sheets are essential tools for professionals across various fields, from project managers and HR teams to data analysts and marketers. 

The WEEKDAY function returns a number representing the day of the week for a given date, making it ideal for organizing work schedules, tracking daily tasks, or analyzing data trends by specific days.

The WEEKNUM function, on the other hand, returns the week number within the year, which is especially useful for reporting on weekly progress, identifying peak activity periods, and managing timelines across large projects.

Together, these functions provide a powerful way to dissect and structure data around daily and weekly cycles, making them invaluable for anyone handling time-sensitive information.

Understanding WEEKDAY AND WEEKNUM Functions (Syntax and Examples)

In this section, we’ll dive into the WEEKDAY and WEEKNUM functions in Google Sheets, along with ISOWEEKNUM for ISO-standard week numbers. You’ll find syntax and examples for each function: WEEKDAY for determining the day of the week, WEEKNUM for identifying the week of the year, and ISOWEEKNUM for ISO week numbers.

WEEKDAY

The WEEKDAY function in Google Sheets returns a number representing the day of the week for a given date, with options for different numbering conventions. 

By default, it assigns 1 to Sunday, 2 to Monday, and so forth. This function is useful for sorting data by specific days, setting up schedules, or organizing tasks that depend on particular weekdays.

Syntax of WEEKDAY

The syntax of the WEEKDAY function in Google Sheets is:

=WEEKDAY(date, [type])

Let's break it down:

  • date: The date for which you want to find the day of the week. This can be a date entered directly, a cell reference, or a formula that returns a date.
  • type (optional): Specifies the numbering system for days of the week.

Common options include:

  • 1 (default): Numbers the days from Sunday = 1 to Saturday = 7.
  • 2: Numbers the days from Monday = 1 to Sunday = 7.
  • 3: Numbers the days from Monday = 0 to Sunday = 6.

The type argument helps customize the day numbering to match your needs, such as Monday-start or Sunday-start weeks.

Example of WEEKDAY

Suppose we need to identify the day of the week for each employee's birthday. 

We can apply the following formula:

=WEEKDAY(C3, 1)

The WEEKDAY function returns a number from 1 to 7, representing each day of the week. By setting the type parameter to 1 (as shown in the formula), the function starts counting from Sunday = 1 through Saturday = 7.

This setup allows quick identification of each employee's weekday of birth, useful for further analysis or planning.

Turn Data into Actionable Insights

Auto-generate reports and dashboards from your data in Google Sheets

Get Started Now

...plus, it's 100% Free!

Pivots & Charts

WEEKNUM

The WEEKNUM function in Google Sheets calculates the week number of a specified date within a year. It returns an integer that represents the position of the week (from 1 to 53) in which the date falls.

This function is particularly useful for tracking and organizing data by weeks, such as planning tasks or monitoring trends over time.

Syntax of WEEKNUM

The syntax of the WEEKNUM function is as follows:

=WEEKNUM(date, [type])

Let's explain:

  • date: The date for which you want to find the week number.
  • type (optional): Specifies the day on which the week starts. 1 (or omitted) – Weeks start on Sunday. 2 – Weeks start on Monday.

The WEEKNUM function returns an integer between 1 and 53, representing the week of the year in which the specified date falls.

In the WEEKNUM function in Google Sheets and Excel, the "type" parameter allows you to customize which day is considered the start of the week. This parameter can vary based on local standards, cultural norms, and specific business requirements. 

Here's a breakdown of the less common types, like Type 11 and Type 17.

Types 1 and 2:

  • Type 1: Week starts on Sunday (the default in most cases).
  • Type 2: Week starts on Monday (widely used in Europe and ISO standard).

Types 11-17:

  • Type 11: Week starts on Monday.
  • Type 12: Week starts on Tuesday.
  • Type 13: Week starts on Wednesday.
  • Type 14: Week starts on Thursday.
  • Type 15: Week starts on Friday.
  • Type 16: Week starts on Saturday.
  • Type 17: Week starts on Sunday (similar to Type 1 but intended for specific localities).

ISO Type:

  • Type 21: Follows the ISO 8601 standard, where the week starts on Monday, and the first week of the year is the one containing January 4 (or the first Thursday of the year). This type is especially useful in international and European contexts where ISO standards are widely adopted.

Types 11-17 offer flexibility in defining the starting day of the week, allowing organizations or individuals to match the week numbering to specific local or business norms

For example:

  • Type 11: (starting on Monday) could align with European business calendars.
  • Type 15: (starting on Friday) might suit specific religious or cultural needs, where Friday marks the start of activities.

Example of WEEKNUM

Suppose we need to determine the week number for each employee’s birthday.

Let's use the formula:

=WEEKNUM(C3, 1)

The WEEKNUM function returns a number from 1 to 53, representing each week of the year. By setting the type parameter to 1 (as shown in the formula), the function starts counting with weeks beginning on Sunday.

This setup allows quick identification of the specific week in which each employee’s birthday falls, useful for scheduling celebrations or analyzing birthday distributions across weeks.

ISOWEEKNUM

The ISOWEEKNUM function in Google Sheets returns the ISO 8601 week number of a specified date. According to the ISO standard, weeks start on Monday, and the first week of the year is the one containing the first Thursday. This method is commonly used in Europe and other parts of the world where week numbering follows the ISO system.

The ISOWEEKNUM function differs from the WEEKNUM function primarily in how it determines the start of the week and the numbering of weeks across years. While WEEKNUM allows you to define the start day (e.g., Sunday or Monday) and doesn’t necessarily follow a global standard, ISOWEEKNUM adheres strictly to the ISO 8601 standard.

The ISO 8601 standard defines a week as beginning on Monday and establishes the first week of the year as the one that contains the year's first Thursday. This standardization ensures that all weeks are numbered consistently, making it ideal for international use. For instance, according to ISO 8601, January 1 could fall in the last week of the previous year if the first Thursday has not yet occurred.

Using ISOWEEKNUM is beneficial for applications requiring global consistency, such as corporate reporting and international scheduling, where week numbering must align with the ISO format.

Syntax of ISOWEEKNUM

The syntax of the ISOWEEKNUM function in Google Sheets is straightforward:

=ISOWEEKNUM(date)

Here's the explanation:

  • date: The only argument for this function. It represents the date for which you want to determine the ISO week number.

This can be a date in a cell, a date entered directly in the function, or a formula that returns a date.

Example of ISOWEEKNUM

Let's say we need to determine the ISO week number for each employee's birthday. We can use the ISOWEEKNUM function in Google Sheets to achieve this.

The formula applied is:

=ISOWEEKNUM(C3)

Here's the breakdown:

  • C3: Represents the birthday date of each employee.

For example, for Michael Jordan's birthday is on 02/17/1963, the function returns 7, indicating that his birthday falls in the 7th ISO week of the year.

This setup helps organize and analyze dates according to the ISO week system, which is particularly useful for international reporting and consistency.

Master WEEKDAY and WEEKNUM Functions with This Ready-to-Use Template!

This downloadable file includes every example and formula from the article, enabling you to practice and implement WEEKDAY, WEEKNUM, ISOWEEKNUM, and more in your projects. Whether you’re new to these functions or aiming to sharpen your skills, this template simplifies the process. Download, explore, and start mastering day and week calculations in Google Sheets with ease.

Image

Basic Examples of Using WEEKDAY and WEEKNUM Functions

In this section, we’ll dive into basic examples of using the WEEKDAY and WEEKNUM functions in Google Sheets. These versatile functions allow you to identify the day of the week, modify week start days, and label week numbers.

We’ll explore practical uses, like adding the word “WEEK” to results, calculating the number of weeks between dates, and leveraging ISOWEEKNUM to track project milestones or organize team events by ISO week numbers. Whether for project planning or scheduling, these functions bring essential date-related insights into your sheets.

Using WEEKDAY to Identify the Day of the Week

The WEEKDAY function in Google Sheets is a simple yet powerful tool to identify the day of the week for any given date. By returning a number representing the day (from Sunday to Saturday), this function helps streamline scheduling, planning, and analyzing patterns based on specific days of the week.

Suppose you want to determine the day of the week each player played their last game for the Chicago Bulls.

To find the weekday, use the following formula:

=WORKDAY(C3, 1)

Here's the breakdown:

  • C3: The last game day.
  • 1: Numbers the days from Sunday = 1 to Saturday = 7, where 1 represents Sunday and 7 represents Saturday.

By copying the formula down, you can see the weekday for each player’s last game, making it easier to analyze the timing of these key moments in Bulls history.

Customizing the WEEKDAY Function with the Type Argument

Customizing the WEEKDAY function with the type argument allows you to change the starting day of the week, making it adaptable to regional preferences and specific scheduling needs. This flexibility is especially useful for aligning with workweek standards in different countries, such as starting the week on Monday in Europe and Asia.

Here’s an example where we customize the weekday numbering to start from Monday instead of Sunday, a system widely used in Europe, Asia, and many other parts of the world.

Let’s continue with the classic Chicago Bulls players and their last game dates. We’ll enter these dates in column C and use the WEEKDAY function with different type arguments in column E to see how it changes the result.

=WEEKDAY(C3, 2)

Breakdown of the formula:

  • C3: The last game day.
  • 2: Numbers the days from Monday = 1 to Sunday = 7.

Using WEEKDAY with type set to 2 will make Monday the first day of the week, so if a date falls on a Monday, the formula will return 1, and so on.

This allows you to see the day of the week according to a custom start day, useful for schedules and analyses that view Monday as the start of the week.

Adding the Word “Week” to the WEEKNUM Function

Adding the word “Week” to the WEEKNUM function output helps create clearer and more readable date references in your data. This simple adjustment makes week numbers easier to understand at a glance, especially when organizing schedules, tracking progress, or displaying timelines in project management or reporting contexts.

Let's say we want to display the week number for each employee’s birthday and add the word "Week" in front of the week number to make it more readable

We can do this by combining the WEEKNUM function with the CONCATENATE or & operator.

Let's apply this formula:

="Week " & WEEKNUM(C3)

This formula will calculate the week number of the date in cell C3 (e.g., Michael Jordan’s birthday, “02/17/1963”) and add the word "Week" in front.

This approach provides a clear and formatted output, making it easier to understand.

Calculate the Number of Weeks in Between Two Dates using WEEKNUM

Calculating the number of weeks between two dates using the WEEKNUM function is a valuable way to measure time intervals for projects, track event durations, or plan schedules. By determining the exact number of weeks, you can efficiently allocate resources, set realistic deadlines, and monitor progress over specific periods.

Let's say we want to find out how many weeks each player spent during the last year in team. Let's calculate the approximate number of weeks between two dates using only the WEEKNUM function. This approach, however, does not consider the exact day difference, as WEEKNUM only counts the week number within a year and does not account for the specific year.

The formula is:

=WEEKNUM(D3) - WEEKNUM(C3)

Note that this method provides an approximate count of weeks based on calendar weeks rather than precise day counts.

Organizing Team Events by ISO Week Numbers in Google Sheets

Organizing team events by ISO week numbers in Google Sheets offers a structured way to plan and coordinate activities across the team. Using ISO-standard weeks ensures everyone is on the same schedule, making it easier to align on tasks, events, and deadlines.

Let's consider each player has a contract renewal date in 2024, based on their original starting dates. Let's use ISOWEEKNUM to identify the specific week number for each contract renewal, allowing project managers to align tasks and deadlines with these milestones.

Let's apply:

=ISOWEEKNUM(D3)

In this formula:

  • D3: The date of the annual contract renewal.

This approach helps the project management team track key contract renewal milestones by ISO week, ensuring each team member is aware of which week each player’s contract is up for renewal.

Instant Data Visualization

Turn your raw data into editable charts and pivots

Visualize Now

...plus, it's 100% Free!

Pivots & Charts

Advanced Application of WEEKDAY and WEEKNUM Functions

Explore powerful ways to apply WEEKDAY and WEEKNUM functions in Google Sheets with this advanced guide. From highlighting weekends and analyzing data by ISO weeks to categorizing project tasks and performing dynamic date calculations, these techniques will help you leverage these functions to manage tasks, analyze data, and enhance workflow efficiency in your spreadsheets.

Highlighting Weekends with Conditional Formatting and WEEKDAY

Highlighting weekends with conditional formatting and the WEEKDAY function in Google Sheets is a useful way to visually separate weekend days from weekdays, making schedules and timelines easier to read.

By identifying weekends with the WEEKDAY function, you can apply conditional formatting rules to automatically highlight these days, streamlining planning and enhancing clarity.

Let's say we would like to know, which team member had his last game during the weekend. To highlight weekends in the "Last Game" column, we can use the WEEKDAY function combined with conditional formatting. 

Here’s how:

=WEEKDAY(C3, 1)

The formula is used to determine the day of the week for each "Last Game" date. This returns a number from 1 (Sunday) to 7 (Saturday).

Let's set the Conditional Formatting:

  • Select the range you want to apply formatting to (e.g., C3:C11 for the "Last Game" dates).
  • Go to Format > Conditional formatting.
  • Use a custom formula: =OR(WEEKDAY(C3)=1, WEEKDAY(C3)=7). This formula checks if the day is either Sunday (1) or Saturday (7).
  • Choose a color to highlight the weekends.

This setup allows you to quickly identify which games were played on weekends by highlighting those dates in a chosen color.

Comparing Different Types of Week Counting Using WEEKNUM

The WEEKNUM function's "type" argument determines which day of the week starts each numbered week, affecting the calculated week number for a given date. By setting this type, you can align week numbering with different regional or organizational standards, such as weeks starting on Sunday, Monday, or even following ISO standards.

In this example, we’re exploring how different WEEKNUM types impact week numbering based on the last game dates of Chicago Bulls players. We’ve applied various WEEKNUM types (1, 2, 14, and 21) to see how each affects the week number for each date.

Here’s how you can do this using the formula:

=WEEKNUM(C3, 21)

Let's explain:

  • C3: The start date for the workday count.
  • 21: ISO 8601 standard, where the week starts on Monday and considers the first Thursday of the year as the start of week 1.

By comparing these types, we can see differences in week numbers, especially when dates are near the beginning or end of the week.

This example helps in understanding how different week-starting days impact the numbering, which is valuable in project management, reporting, and aligning with international standards.

Categorizing Project Tasks by Week Using WEEKNUM

To manage project tasks effectively, categorizing them by week can help team members stay organized and aware of deadlines. Using the WEEKNUM function, you can assign each task to a specific week based on a given start or due date.

Let’s say we want to categorize each employee’s contract renewal into the corresponding week of 2024. Using the WEEKNUM function, we can determine the week number for each renewal date.

Here’s how it’s done:

=WEEKNUM(D3)

Sorting the sheet by contract renewal week allows for efficient planning and management of document preparation, making it easier to coordinate and handle each contract's renewal process effectively.

This categorization aids in task distribution and weekly planning for the project team.

Analyzing Sales Data by ISO Week Numbers using ISOWEEKNUM

The ISOWEEKNUM function offers a powerful tool for tracking performance trends by grouping data by ISO week numbers. This approach is particularly useful for analysts working with weekly metrics, allowing consistent analysis over standard timeframes.

Let's analyze the Chicago Bulls' scores for their November games during the 1995 season by grouping the results by ISO week numbers. By using the ISOWEEKNUM function, we assigned each game to its corresponding ISO week. This allows us to see scoring patterns and track the team's performance week by week.

In our table, we have the dates of games in the column and the scores the team achieved. Using the formula =ISOWEEKNUM(C3), we calculated the ISO week for each game date in column D.

Let's apply:

=ISOWEEKNUM(C3)

To analyze the total scores by week, we’ll create a pivot table:

  • Select the data range B2:D16
  • Go to Data > Pivot Table to set up a new pivot table.

In the pivot table:

  • Add ISO Week to Rows.
  • Add Score to Values, setting the aggregation to SUM.

Visualize weekly score trends:

  • Highlight your pivot table data or select the ISO week numbers and their corresponding total sales.
  • Insert a chart (via Insert > Chart) to visualize sales trends over the weeks. Line charts work well for time series data like this.

This setup allows you to quickly observe performance peaks and dips during November 1995, providing insights into how the team performed each week.

This method of aggregating data by ISO week numbers and visualizing trends through pivot tables and charts is highly effective for analyzing time-based performance metrics. It enables quick identification of weekly patterns, helping analysts make informed decisions based on observed trends.

Make Sense of Your Data

Automatically generate Pivots & Charts in Google Sheets!

Visualize Your Data

...plus, it's 100% Free!

Pivots & Charts

Combining WEEKDAY and WEEKNUM with Other Functions in Google Sheets

In Google Sheets, combining WEEKDAY and WEEKNUM with other functions unlocks powerful data analysis possibilities. From displaying weekday names using CHOOSE to counting occurrences with COUNTIF and ARRAYFORMULA, these integrations enhance functionality.

Dynamic date calculations, matching, and real-time updates using NOW, and DATE functions offer flexibility for tracking and organizing data efficiently.

Displaying Weekday Names Using WEEKDAY and CHOOSE Functions

Displaying weekday names with the WEEKDAY and CHOOSE functions in Google Sheets is an effective way to translate numeric weekday outputs into readable names, enhancing clarity and usability in your data. By combining these two functions, you can automatically assign the correct weekday name to any given date in your spreadsheet.

Let's say we want to know the exact day of the week when each team member played their last game. In column E, we use the following formula to display the weekday names.

Here’s how:

=CHOOSE(WEEKDAY(C3,1),"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")

Here’s how it works:

  • WEEKDAY: extracts the numeric day of the week from the date in column C (e.g., 1 for Sunday, 7 for Saturday).
  • CHOOSE: maps these numbers to their respective weekday names using a predefined list: "Sunday", "Monday", "Tuesday", ….

This approach is useful for tracking schedules, identifying patterns, or organizing tasks by weekday in an intuitive and user-friendly way.

WEEKDAY Function with COUNTIF and ARRAYFORMULA

Combining the WEEKDAY function with ARRAYFORMULA and COUNTIF allows you to perform advanced operations, such as counting specific weekdays across a range of dates. This method is especially useful when analyzing trends or organizing tasks based on days of the week.

Dive deeper with this read

Mastering ARRAYFORMULA in Google Sheets: A Complete Guide

Image for article: Mastering ARRAYFORMULA in Google Sheets: A Complete Guide

Let’s say we want to determine how many games the Chicago Bulls played on a Sunday in the "Last Game" column. 

We can use the formula:

=COUNTIF(ARRAYFORMULA(WEEKDAY(C3:C10, 1)), 1)

Here's the breakdown:

  • WEEKDAY(C3:C10,1): Converts each date in the range C3:C10 into a numeric representation of the weekday (e.g., Monday = 2, Sunday = 1).
  • ARRAYFORMULA: ensures the WEEKDAY function is applied to the entire range.
  • COUNTIF: Counts how many of these numeric weekday results are equal to 1 (Sunday).

The formula calculates that 4 games occurred on a Sunday. You can adapt this method to count other days of the week by simply replacing 1 (Sunday) in the formula with another number corresponding to the desired weekday (e.g., 2 for Monday, 3 for Tuesday, etc.).

This example highlights the flexibility of combining WEEKDAY with other functions like COUNTIF to extract meaningful insights from date data. This makes it easy to identify specific patterns or trends, such as scheduling preferences or historical events, based on the day of the week.

WEEKDAY with IF Function

The combination of the WEEKDAY with IF function is a powerful way to classify dates based on the day of the week. By combining these functions, you can quickly label dates, which is especially useful for analyzing data or managing schedules.

Dive deeper with this read

How to Leverage the IF Function in Google Sheets for Conditional Logic

Image for article: How to Leverage the IF Function in Google Sheets for Conditional Logic

Let’s say we want to determine whether the last games played by each Chicago Bulls player occurred on a weekday or a weekend. The WEEKDAY function identifies the day of the week for a given date, and the IF function classifies it based on the result.

Let's apply:

=IF(WEEKDAY(C3,2)<6,"Weekday","Weekend")

Let's explain:

  • WEEKDAY(C3,2): returns a number (1 for Monday, 7 for Sunday) based on the date in C3.
  • IF: checks if the number is less than 6 (Monday to Friday). If true, it outputs "Weekday", otherwise "Weekend".

This approach simplifies classification for scheduling or analysis tasks, providing quick insight into patterns or trends based on the day of the week.

WEEKDAY with INDEX and MATCH Function

The WEEKDAY function becomes even more versatile when combined with INDEX and MATCH functions, enabling more advanced lookups based on specific day criteria. This combination is perfect for pinpointing data that matches certain conditions, such as finding entries that fall on a particular day of the week.

Dive deeper with this read

Complete Guide to Using INDEX and MATCH Functions in Google Sheets

Image for article: Complete Guide to Using INDEX and MATCH Functions in Google Sheets

Let’s determine which Chicago Bulls player has a contract renewal date that falls on a Friday. Using the WEEKDAY function, we identified the day of the week for each renewal date. Then, with INDEX and MATCH, we located the name of the player whose renewal date matches our target day.

Let's use:

=INDEX(B3:B10,MATCH(7,WEEKDAY(D3:D10,1),0))

Let's explain:

  • WEEKDAY(D3:D10, 1): calculates the weekday for each date in the Renewal column (1 = Sunday, 7 = Saturday).
  • MATCH(7, WEEKDAY(D3:D10, 1), 0): finds the first instance of Friday (7 in the WEEKDAY system).
  • INDEX(B3:B10, ...): retrieves the corresponding player name from the Employee column.

The formula identifies Michael Jordan as the employee with a Saturday renewal date. This detail is significant because contract renewal may not be feasible on a Saturday if the office is closed. Adjustments to the renewal schedule might be necessary to avoid logistical issues.

This approach is an excellent example of how such formulas can automate decision-making and highlight potential scheduling conflicts in a dataset.

WEEKDAY with VLOOKUP and TODAY Function

The combination of WEEKDAY, VLOOKUP, and TODAY functions in Google Sheets is a powerful way to dynamically retrieve data based on the current day of the week.

Dive deeper with this read

Everything about VLOOKUP in Google Sheets

Image for article: Everything about VLOOKUP in Google Sheets

This approach is perfect for automating workflows like assigning tasks, identifying schedules, or selecting context-specific information. By leveraging these functions together, you can eliminate the need for manual updates and streamline data retrieval.

Let's say our team selects a certain color of the uniform for a certain day of the week. We can dynamically determine the uniform color for the current day of the week. The reference table includes weekday numbers, names, and corresponding uniform colors.

Let's use this formula:

=VLOOKUP(WEEKDAY(TODAY(), 2), B3:D9, 3, FALSE)

Breakdown:

  • TODAY(): retrieves the current date.
  • WEEKDAY(): converts this date into a weekday number (1 = Monday, 7 = Sunday) using the type 2 argument.
  • VLOOKUP: searches for the weekday number and retrieves the corresponding uniform color.
  • FALSE: ensures an exact match is required.

This setup dynamically updates the result each day, ensuring the correct uniform color is displayed without manual intervention.

Dynamic Date Calculations Using WEEKNUM with the DATE Function

The combination of the DATE and WEEKNUM functions in Google Sheets allows you to calculate the week number for any given date dynamically. This is particularly useful for scheduling, planning, or tracking events based on weekly intervals.

By constructing a complete date from year, month, and day inputs using the DATE function and pairing it with WEEKNUM, you can easily determine the week number of a specific date.

Suppose we aim to determine the week number for employees' contract start dates. The data is structured into separate columns for the contract year. 

Use the formula:

=WEEKNUM(DATE(C3, D3, E3))

Let's break it down:

  • DATE: combines the year, month, and day values into a complete date.
  • WEEKNUM: calculates the corresponding week number for each date.

This approach helps in understanding the timing of contract commencements and can be applied for scheduling or aligning events with weekly timelines.

Combining ISOWEEKNUM with the DATE Function

The combination of the ISOWEEKNUM and DATE functions in Google Sheets enables users to determine the ISO week number for any given date dynamically.

This method is particularly useful for organizing tasks, tracking deadlines, or planning schedules based on internationally recognized weekly standards. By constructing a full date using the DATE function and feeding it into ISOWEEKNUM, you can effectively pinpoint the ISO week for any specific combination of year, month, and day.

Let's say we aim to calculate the ISO week number of employees' contract start dates. To calculate the ISO week for each employee's contract start date, we use the formula:

=ISOWEEKNUM(DATE(C3,D3,E3))

Let's break it down:

  • DATE: combine the year, month, and day values into a complete date.
  • ISOWEEKNUM: determines the ISO week number for the constructed date.

This approach ensures consistency when working with international or weekly planning systems, providing an accurate framework for weekly scheduling and reporting.

Combining ISOWEEKNUM with NOW function

Combining the ISOWEEKNUM function with the NOW function allows you to dynamically calculate the current ISO week number based on today's date.

This approach is useful for tracking ongoing projects, scheduling tasks, or aligning weekly goals with ISO-standardized week numbers. Using NOW, the calculation updates automatically, ensuring your data reflects the current week.

Dive deeper with this read

How to Use NOW and TODAY Functions in Google Sheets for Real-Time Data

Image for article: How to Use NOW and TODAY Functions in Google Sheets for Real-Time Data

Suppose we have a list of employees with their Contract Start and Renewal Dates. We aim to identify the ISO week of their Contract Start date and the current ISO week for today.

To retrieve ISO week for today, apply:

=ISOWEEKNUM(NOW())

This dynamic approach is valuable for tracking deadlines or syncing schedules in real time.

Turn Data into Actionable Insights

Auto-generate reports and dashboards from your data in Google Sheets

Get Started Now

...plus, it's 100% Free!

Pivots & Charts

Troubleshooting Common Errors in WEEKDAY and WEEKNUM Functions

The WEEKDAY and WEEKNUM functions are essential for date-based calculations but can occasionally produce errors. Understanding the causes and solutions for these errors ensures accurate results and smooth functionality. Below are common errors and troubleshooting tips to help you resolve them effectively.

#VALUE! Error

⚠️ Error: The #VALUE! error occurs when the function references non-date cells or invalid inputs, such as text or numbers where dates are expected.

Solution: Ensure all referenced cells contain valid date values formatted correctly. Use the DATE function to convert text strings into valid dates if necessary.

#NUM! Error

⚠️ Error: The #NUM! error happens when the "type" parameter in WEEKDAY or WEEKNUM is outside its acceptable range or when calculating dates with invalid numeric values.

Solution: Verify that the "type" argument is a valid number (e.g., 1, 2, or 3 for WEEKDAY) and check that dates fall within the valid date range supported by Google Sheets.

#REF! Error

⚠️ Error: The #REF! error arises when the formula references cells that have been deleted or are outside the valid range.

Solution: Update the formula to reference existing, valid cells. If a range has changed, adjust the formula to include the correct references.

#N/A Error

⚠️ Error: The #N/A error occurs if the function cannot find the specified date or type in the referenced range or lookup.

Solution: Ensure that the dates or types being referenced exist in the range and that the formula parameters align with the data. Double-check the lookup ranges for accuracy.

#NAME? Error

⚠️ Error: The #NAME? error appears when the function name is misspelled or the formula references undefined names.

Solution: Ensure that the function is spelled correctly (e.g., WEEKNUM, not WEEKNUMBER) and that all named ranges or functions are defined in the sheet.

Circular Reference Error

⚠️ Error: This error happens when a formula references its own cell directly or indirectly, creating an infinite calculation loop.

Solution: Check the formula for self-references and restructure it to remove circular dependencies. Use helper columns if needed to avoid this issue.

Incorrect Date Format

⚠️ Error: Incorrectly formatted dates cause errors or inaccurate results in WEEKDAY and WEEKNUM functions.

Solution: Ensure all date inputs are in a recognizable format (e.g., YYYY-MM-DD). Use the DATE function to standardize formats, especially if importing data from external sources.

Invalid "type" Parameter

⚠️ Error: Providing an invalid "type" argument in WEEKDAY or WEEKNUM causes the function to return errors.

Solution: Use a valid "type" value (e.g., 1 for Sunday-start, 2 for Monday-start). Refer to the function documentation for acceptable "type" values to avoid this error.

Instant Data Visualization

Turn your raw data into editable charts and pivots

Visualize Now

...plus, it's 100% Free!

Pivots & Charts

Best Practices to Follow When Using WEEKDAY and WEEKNUM Functions

The WEEKDAY and WEEKNUM functions are powerful tools for date analysis in Google Sheets. By following these best practices, you can ensure accurate calculations, enhanced functionality, and consistent results when working with date-based functions.

Combining WEEKDAY, WEEKNUM, and ISOWEEKNUM with Other Functions

Leverage the full potential of WEEKDAY, WEEKNUM, and ISOWEEKNUM functions by combining them with IF, INDEX, or VLOOKUP to create dynamic and automated workflows. For example, highlight specific days or weeks to enhance data visualization and streamline reporting processes.

Ensure Correct Date Formatting for Accurate Results

Always use valid date formats (e.g., YYYY-MM-DD) to avoid errors. Dates imported from external sources should be standardized using the DATE function. Incorrect formatting can lead to miscalculations or invalid results in your formulas with ISOWEEKNUM and WEEKDAY.

Specifying the Right Week Numbering System

Choose the correct numbering system for your use case. Use WEEKNUM for standard week numbering and ISOWEEKNUM for ISO-compliant week numbering. Ensure the "type" parameter aligns with your desired starting day of the week.

Use Absolute References for Consistent Calculations

When copying formulas across rows or columns, use absolute references (e.g., $A$1) to maintain consistent cell references. This prevents accidental changes to ranges and ensures your formulas remain accurate.

Use Conditional Formatting

Pair the WEEKDAY or WEEKNUM function with conditional formatting to visually highlight weekends, specific weeks, or dates. This practice improves readability and helps users quickly identify important patterns or deadlines.

Formatting Cells to Prevent Automatic Updates

To avoid unintentional changes in your data, ensure cells with dates are formatted as "Date" rather than plain text. This prevents Google Sheets from interpreting or altering the data incorrectly, especially when using the NOW or TODAY functions.

Key Google Sheets Functions for Advanced Data Analysis

Google Sheets provides robust functions to streamline data analysis, making it easier to manage and interpret large datasets. These functions empower users to uncover insights, organize information effectively, and conduct detailed analysis with ease, saving time and enhancing productivity.

  • UNIQUE: Extracts unique values from a range, removing duplicates to create a cleaner dataset.
  • PIVOT: Creates dynamic summaries by grouping and aggregating data for easy analysis.
  • IMPORTRANGE: Imports a specific range of cells from another spreadsheet for seamless data consolidation.
  • MATCH: Locates a value within a range and returns its relative position, aiding lookups.
  • COUNTA: Counts non-empty cells in a range, useful for tracking entries or data completeness.
  • MAX, MIN, MEDIAN: Identifies the highest value (MAX), lowest value (MIN), or middle value (MEDIAN) for statistical analysis.

Visualize Your Data with OWOX Reports Extension for Google Sheets

With the OWOX: Reports, Charts and Pivot extension, you can seamlessly import BigQuery data straight into Google Sheets. Say goodbye to manual data transfers and import hassles. This powerful tool equips you with everything you need to manage numbers efficiently and make data-driven decisions with ease!

Make Sense of Your Data

Automatically generate Pivots & Charts in Google Sheets!

Visualize Your Data

...plus, it's 100% Free!

Pivots & Charts

FAQ

Expand all Close all
  • What is the difference between the WEEKDAY and WEEKNUM functions in Google Sheets?

    The WEEKDAY function returns a number representing the day of the week for a specific date, with options to define the starting day (e.g., Sunday or Monday). The WEEKNUM function returns the week number of a specific date in a year, based on a chosen numbering system.

  • How do I calculate the ISO week number in Google Sheets?

    To calculate the ISO week number, use the ISOWEEKNUM function.
    For example:

    =ISOWEEKNUM(A1)

    This formula assigns each date to its ISO-compliant week number, starting from the first Thursday of the year.

  • How can I add the word "Week" before the week number in Google Sheets?

    You can use the TEXT function to prepend the word "Week" to the week number.
    For example:

    ="Week " & WEEKNUM(A1)

    This displays the result as "Week 1", "Week 2", etc., for clarity and better formatting.

  • What should I do if my WEEKNUM function returns a #NUM! error?

    The #NUM! error occurs if the "type" parameter in the WEEKNUM function is invalid. Ensure the "type" parameter is within the valid range (1 or 2).
    Example:

    =WEEKNUM(A1,1)

    Double-check that the referenced date is valid and formatted correctly.

  • Can I combine WEEKDAY with other functions to display weekday names?

    Yes, you can combine WEEKDAY with functions like CHOOSE or VLOOKUP to display weekday names. 

    For example:

    =CHOOSE(WEEKDAY(A1,1),"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")

    This formula displays the weekday name for any given date.

  • How can I calculate the number of weeks between two dates in Google Sheets?

    Use the WEEKNUM function to calculate the week numbers of two dates and subtract them:

    =WEEKNUM(B1) - WEEKNUM(A1)

    This calculates the exact number of weeks between two dates.