I'm putting a schedule together (1 year - 12 month waves) - I want to autopopulate as much as populate - therefore, I'll have a few key dates and then will add formula to the remaining.. i.e. +1 day, +3 days etc... However, I need to know the formula that if the formula throws up a Saturday or Sunday, I need to add a day or two so the day for the task is a working day
Haven't had any luck
You could achieve this by 2 sequences:
=TOCOL(SEQUENCE(52,,44928,7)+SEQUENCE(,5,0))
The first sequence creates
52
numbers (number of weeks) numbers starting from44928
in steps of 7 between each value. (44928 is Excel's date representation of Monday January 2nd 2023. You could also refer to a cell that holds the start date, as long as that's a Monday). This sequence is vertical.The second adds a horizontal sequence of
5
(days you want to show) to the first sequence.Since your first sequence is vertical and this is horizontal, the 2nd sequence will be added to each row of the 1st sequence. This creates a 2D array. We can use
TOCOL
to flatten the 2D array to 1D vertically, orTOROW
to flatten horizontally.