Date Range based on start date and end date -...

Date Range based on start date and end date - I want to autofill a column with a range of dates given a start date and end date that skips weekends.

Possible?

Also, I want to have another column where holiday dates are listed and are skipped in the above mentioned column.

any ideas of how that can happen?

0 8 2,176
8 REPLIES 8

As long as you have your holidays/weekends listed in a range you can use the following in google sheetsโ€ฆ Just throwing that at you.

For the first part, if you are using google sheets as your source, i would think that is easier to do with and Arrayformula in the sheet.

Would have to think about the second part, but also might be best done in the source sheet?

Sounds like an advanced scheduling tool is what you need. Like a primavera p6โ€ฆ I mean you could hack something together, butโ€ฆ

Is the finish date based on duration?

A simple way to start would be to create a static table in which you drag down every day for the next 5 years. Then you can have a column where you can denote true/false for holiday, another column that denotes the day of the week. Then you have future capability for adding a column for different shift coverage, etc.

Then in your expressions you do count (select off of your date ranges the select/filters can pull out the dates that mean something to youโ€ฆ

Itโ€™s a little crude, but it worksโ€ฆ (And crude becomes relatively necessary when you stay taking about designated work daysโ€ฆ)

Cause, you donโ€™t want to hardcode thisโ€ฆ

Itโ€™s all based on next yearโ€™s school calendar, for example - given dates - I just want it to be easy to auto populate the column depending on the schoolโ€™s year.

I donโ€™t want to drag downโ€ฆ because I want something simple to use for the average teacher using this app who probably wonโ€™t look at the spreadsheet - so they can just put in their 1st day of school, last day of school, and holidays - done the list is created.

I got this formula from another google sheets community that works perfectlyโ€ฆ but was wondering if there is a shorter version

"With a start date in B2, and an end date in C2 and with holidays in column D starting at D2, I think this formula will do what you are hoping.

=ARRAYFORMULA(FILTER(B2+ROW(INDIRECT(โ€œA1:Aโ€&C2-B2+1))-1,WEEKDAY(B2+ROW(INDIRECT(โ€œA1:Aโ€&C2-B2+1))-1,2)<6,ISNA(MATCH(B2+ROW(INDIRECT(โ€œA1:Aโ€&C2-B2+1))-1,D2:D,0))))"

Top Labels in this Space