0

I need to keep track of an employee who works Mondays and Thursdays. I need to fill a column with dates for these days. I know how to do sequential dates and I have tried dragging down from the corner on a series of manually entered dates, but this does not work, presumable because there is a 3-day gap, then a two-day gap. The column looks like this (European date format):

Monday, 2 10 2023

Thursday, 5 10 2023

Monday, 9 10 2023

Thursday, 12 10 2023

... etc.

1

1 Answer 1

0

To get Mondays and Thursdays in the next 4 weeks starting on 2023-10-02, use this:

=let( 
  dates, sequence(4 * 7, 1, "2023-10-02"), 
  filter( 
    to_date(dates), 
    match(weekday(dates, 2), vstack(1, 4), 0) 
  ) 
)

This uses a convention where Monday is weekday 1, Thursday is 4 and Sunday is 7.

See let(), sequence(), filter(), vstack() and match().

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.