Finding Week Start and End Dates in Google Sheets: Formulas

Published on

If you find the week’s start date, i.e., the beginning of the week, you can determine the end date of the week. To accomplish this, we utilize the WEEKDAY function in Google Sheets.

Why is this formula significant to learn?

Many spreadsheet calculations rely on dates. For instance, when filtering data for recent weeks, you may need to determine the week’s start date from today and then determine the number of weeks you desire from that starting point. You can use them as criteria in the FILTER function.

Formula to find the week’s start date from a given date in cell A1:

=A1-WEEKDAY(A1, 1)+1

Formula to find the week’s end date from a given date in cell A1:

=A1-WEEKDAY(A1, 1)+7

These formulas are for weeks starting from Sunday. To start from Monday, you must replace type 1 with type 2 in the formula. Refer to the syntax below to understand the position of type in the formula:

WEEKDAY(date, [type])

Example: Finding Week Start Dates in Google Sheets

We have a list of dates in the cell range B3:B10. To find the week start date of the date in cell B3, we can use the following formula in cell C3:

=B3-WEEKDAY(B3, 1)+1

Click and drag the bottom right fill handle (which turns into a plus sign) in cell C3 down to cell C10.

Alternatively, clear all the values in C3:C10 and use the following array formula in cell C3:

=ArrayFormula(B3:B10-WEEKDAY(B3:B10, 1)+1)
Finding Week Start Dates in Google Sheets

Why Does Formula Show 24/12/1899 as Week Start?

The formula sometimes returns the first day of the week as 24/12/1899 if the type specified in the WEEKDAY function is 1 or 25/12/1899 if the type is 2.

This typically occurs with blank cells in the calculation range. There are several ways to solve this, but I suggest using the following DATEVALUE and IFERROR combination.

Non-Array Formula for Cell B3:

=IFERROR(B3-WEEKDAY(DATEVALUE(B3), 1)+1)

Array Formula for Cell Range B3:B10:

=ArrayFormula(IFERROR(B3:B10-WEEKDAY(DATEVALUE(B3:B10), 1)+1))

The formula result will be date values, not dates. To format that back to dates, select the result and click Format > Number > Date.

Example: Finding Week End Dates in Google Sheets

Here, things are pretty straightforward. We already have the formula that finds the first day of the week. You just need to add 6 days to it.

The simple way to achieve this is to replace “+1” in the formula with “+7”.

Consider the sample data in the earlier example. In cell D3, enter the following formula and drag it down until cell D10:

=B3-WEEKDAY(B3, 1)+7

Alternatively, you can use the following array formula in cell D3 to get the last day of the week:

=ArrayFormula(B3:B10-WEEKDAY(B3:B10, 1)+7)
Finding Week End Dates in Google Sheets

You only need to consider the DATEVALUE + IFERROR approach if you expect blank cells between dates.

Resources

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

How to Perform Case-Sensitive XLOOKUP in Excel with EXACT

We may not always need to perform a case-sensitive XLOOKUP for product names in...

Filter the Last 7 Days in Excel Using the FILTER Function

You may have records spanning several days and want to filter the last 7...

Find Missing Dates in Excel

You can find missing dates in a list in Excel using either a VLOOKUP...

Generate Unique Random Numbers in Excel with Dynamic Arrays

Unique random numbers refer to random numbers without duplicates. Generating such numbers is straightforward...

More like this

XMATCH Row by Row: Finding Values Across a Range in Google Sheets

Using the BYROW function with XMATCH in Google Sheets allows us to match values...

Limit Formula Expansion to a Specific Row in Google Sheets

In this tutorial, I’ll explain how to limit the expansion of an array formula...

3-D Referencing Structured Data Tables in Google Sheets

When you have several tables within a single sheet—not across multiple sheets in a...

12 COMMENTS

  1. I want to choose the weekend date from a specific cell on a Spreadsheet and have the week on Friday. Any help with that formula?

    For example, cell J2 has a date on it, i.e., Wed, 13 Apr 2022. I want the weekend date column to show Fri, 15 Apr 2022. Please help!

  2. Hi, it is not working, at least for my case, it always returns the day before and not the start day of the week, if I put 07/08/2020, it returns 07/07/2020. I want both dates in one cell, so I’m using this:

    =arrayformula(if(G5:G="",,CONCATENATE(TEXT(G5-weeknum(today(),2)+1,"mm/dd/yy")," - ",TEXT(G5-weeknum(today(),2)+1+6,"mm/dd/yy"))))

    Any help appreciated.

    Thanks

    • Hi, Nick,

      The formula is wrong!

      To find the week start and the week end date of the date in cell G5 in combined form, use the below formula.

      =if(len(G5),text(G5-WEEKDAY(G5,2)+1,"mm/dd/yy")& " - "&text(G5-WEEKDAY(G5,2)+1+6,"mm/dd/yy"),)

      Best,

  3. My start date is on Sunday. The problem is when the date is on a Sunday, the date will reflect the previous Sunday date instead of putting the date as it is.

    Example: I am trying to get the start date of June 9, 2019, which is a Sunday. So, instead of showing June 09, 2019, it will show June 02, 2019 which is the start date of the previous week. How can I fix this?

    • Hi, Chester B,

      The formula is working like this.

      given date - weekday(given date)+1

      Weekday of Sunday is 1.

      =date(2019,6,9)-weekday(date(2019,6,9))+1

      So the above formula is equal to;

      =date(2019,6,9)-1+1

      So I don’t find any issue with my formula.

    • Hi, Shuv,

      You can probably use this formula.

      =TODAY()-WEEKDAY(TODAY())+1-9*7

      If you want to find a week start date 5 weeks ago, then replace 9 in the above formula with 4. I mean n-1.

      Best,

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.