SOLVED

# Getting the date of each mondays between two dates

Frequent Contributor

# Getting the date of each mondays between two dates

Hi

I am using google Sheets and I need a formula or function that returns the date of each Monday between two dates, see the attached file.

Thx.

8 Replies
best response confirmed by ajl_ahmed (Frequent Contributor)
Solution

# Re: Getting the date of each mondays between two dates

Format column C as date.

In C6:

=SEQUENCE(ROUNDUP((J7-J6)/7,0),1,J6+7-WEEKDAY(J6,12),7)

This will automatically spill to the rows below.

Many Thx.

# Re: Getting the date of each mondays between two dates

a little bit of modification on my questionIf I want to get the dates of each Sunday, Tuesday, Wednesday, and Thursday between the starting and ending dates. What should be the formula?@Hans Vogelaar

# Re: Getting the date of each mondays between two dates

a little bit of modification on my question
If I want to get the dates of each Sunday, Tuesday, Wednesday, and Thursday between the starting and ending dates. What should be the formula?

# Re: Getting the date of each mondays between two dates

Try this:

=LET(s,SEQUENCE(J7-J6+1,1,J6+7-WEEKDAY(J6,12)),FILTER(s,(WEEKDAY(s)=1)+(WEEKDAY(s)=3)+(WEEKDAY(s)=4)+(WEEKDAY(s)=5)))

I tested in Excel. Does that work in Google Sheets?

# Re: Getting the date of each mondays between two dates

i will test it on google sheet
I need Monday included in this formula. How?

# Re: Getting the date of each mondays between two dates

=FILTER(SEQUENCE(J7-J6+1,1,J6+7-WEEKDAY(J6,12)),(WEEKDAY(SEQUENCE(J7-J6+1,1,J6+7-WEEKDAY(J6,12)))=1)+(WEEKDAY(SEQUENCE(J7-J6+1,1,J6+7-WEEKDAY(J6,12)))=2)+(WEEKDAY(SEQUENCE(J7-J6+1,1,J6+7-WEEKDAY(J6,12)))=3)+(WEEKDAY(SEQUENCE(J7-J6+1,1,J6+7-WEEKDAY(J6,12)))=4)+(WEEKDAY(SEQUENCE(J7-J6+1,1,J6+7-WEEKDAY(J6,12)))=5))

or shorter

=FILTER(SEQUENCE(J7-J6+1,1,J6+7-WEEKDAY(J6,12)),WEEKDAY(SEQUENCE(J7-J6+1,1,J6+7-WEEKDAY(J6,12)))<6)