Google Sheets: List All Sundays from a Start and End Date

Do you know how to list all Sundays from a start and end date in Google Sheets? If not, here’s an awesome tip for you!

You can use the same formula I’ll provide to populate all Sundays, Mondays, or any other day of the week within a given date range. What’s more, you can even populate all weekends (Saturdays and Sundays) between two dates in Google Sheets.

First, let’s see how to list all Sundays between a start and end date. Then, I’ll explain how to adjust this formula to list weekends or any other days of the week.

How to List All Sundays from a Start and End Date in Google Sheets

In this tutorial, I’ll be following the steps I’ve used previously to populate all dates between a start and end date.

The logic here is simple: first, populate all the dates between the given start and end date. Then, filter out the dates that aren’t Sundays.

Note: In this tutorial, I will not explain the first part of the logic, which is how to populate all the dates between two given dates. For that, please refer to the following tutorial:

Related: How to Auto Populate Dates Between Two Given Dates in Google Sheets

First, take a look at the formula. I’ll explain the filtering part (to show only Sundays) afterward.

Example Formula 1

For this example, let’s populate all the Sundays in the month of May 2018. If the start date is in cell A1 and the end date is in cell A2, the formula to list all the Sundays between these dates would be:

=QUERY(
   ARRAYFORMULA(TO_DATE(ROW(INDIRECT("E"&A1):INDIRECT("E"&A2)))), 
   "SELECT Col1 WHERE dayOfWeek(Col1)=1"
)

Functions Used: QUERY, ARRAYFORMULA, TO_DATE, ROW, INDIRECT

Example of listing all Sundays from a start and end date in Google Sheets

How it works:

  • This formula generates all the dates between the two specified dates in A1 and A2.
  • Then, the QUERY function filters the result, selecting only the rows where the day of the week is Sunday (dayOfWeek(Col1)=1).

Example Output

For a start date of 01/01/2018 and an end date of 31/12/2018, the formula will return all the Sundays of the year 2018.

I have already explained the logic behind this formula in my earlier example. It first generates all the dates and then filters out everything except Sundays.

If you’re unfamiliar with how to populate all the dates between a start and end date, please refer to the previous link.

Here’s the relevant formula from Example Formula 1:

=ARRAYFORMULA(TO_DATE(ROW(INDIRECT("E"&A1):INDIRECT("E"&A2))))

This formula generates the dates from 01/05/2018 to 31/05/2018. When wrapped with the QUERY function, it filters out everything except Sundays.

In the formula, dayOfWeek(Col1)=1 specifies Sunday. If you want to list all Mondays, replace the 1 with 2.

Now that you know how to list all Sundays in Google Sheets, let’s move on to listing weekends.

How to List All Weekends from a Start and End Date in Google Sheets

To list both Saturdays and Sundays (weekends), you can modify the formula slightly to include Saturdays.

Example Formula 2

=QUERY(
   ARRAYFORMULA(TO_DATE(ROW(INDIRECT("E"&A1):INDIRECT("E"&A2)))), 
   "SELECT Col1 WHERE dayOfWeek(Col1)=1 OR dayOfWeek(Col1)=7"
)

In this formula:

  • dayOfWeek(Col1)=1 refers to Sunday.
  • dayOfWeek(Col1)=7 refers to Saturday.

This formula will return all Saturdays and Sundays between the given start and end date.

Final Thoughts

That’s all for listing Sundays or weekends in Google Sheets! You can easily modify these formulas to include other days of the week by changing the dayOfWeek values.

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Expert Prashanth KV is a Diamond Product Expert in Google Sheets, officially recognized by Google for his contributions to the Docs Editors Help Community and featured in the Google Product Experts Directory. Explore his blog to learn advanced formulas, automation tips, and problem-solving techniques to elevate your spreadsheet skills.

How to Build an Advanced Book Tracker in Google Sheets: Formulas Explained

If you're tired of forgetting what you've read, which books you rated 5 stars,...

Google Sheets Reading List Tracker Template (Free Download)

Looking for a smarter, more visual way to manage your reading goals? This Google...

Custom Order for QUERY Pivot Headers in Google Sheets

By default, when you use the PIVOT clause in a Google Sheets QUERY, the...

Calculate Trip Days by Month (Start, End, and Full Days) in Google Sheets

If you're managing business travel in Google Sheets, you may need to calculate how...

More like this

How to Build an Advanced Book Tracker in Google Sheets: Formulas Explained

If you're tired of forgetting what you've read, which books you rated 5 stars,...

Google Sheets Reading List Tracker Template (Free Download)

Looking for a smarter, more visual way to manage your reading goals? This Google...

Custom Order for QUERY Pivot Headers in Google Sheets

By default, when you use the PIVOT clause in a Google Sheets QUERY, the...

10 COMMENTS

  1. Any idea how I can populate two cells with the same date while carrying on the sequence?

    For example, A1 and A2 be 9/4/22, then A3 and A4 be 9/11/22, and so on.

    • Hi, Cody Donton,

      It seems you want to list all Sundays twice in a sequence.

      If that is the case, you can use this formula in A1.

      =filter(date(2022,9,4)+int(sequence(100*2,1,0)/2),
      weekday(date(2022,9,4)+int(sequence(100*2,1,0)/2))=1)

      The formula will return the dates 4-Sep-2022, 4-Sep-2022, 11-Sep-2022, 11-Sep-2022, 18-Sep-2022, 18-Sep-2022, and so on.

      To get more dates in the sequence, replace 100, which appears twice in the formula, with a large number.

  2. Hi there – here’s a solution that doesn’t need =query() to generate a list of weekdays (in this case Mondays) between your start and end dates:

    =sequence(round(days(A2,A1)/7)+1,1,A1,7)

    • Hi, Stephen Wheeler,

      Thanks for sharing.

      It seems you require to change A1 in the last part of the formula with (A1-weekday(A1))+9 to return Monday irrespective of the weekday in A1.

      E.g.: =sequence(round(days(A2,A1)/7)+1,1,(A1-weekday(A1))+9,7)

  3. So helpful, thank you! How could I modify this to have two dates populate in the same cell, so a week (Sunday-Saturday) is listed?

  4. Dear InfoInspired,

    This was a very helpful tutorial. Is there any way I can populate all dates in a single row rather than a column? Please let me know, it will be very helpful.

    Thank you

    Ekta

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.