'excel dynamically generate weekdays unitl today (included)
My objective is to have 1 formula (better) or macro that can automatically generate all weekdays from a given day cell reference until today (included).
Say I have a A1 cell with "2022-01-01", how can I generate a column with values that will include all weekdays until today? (this will be a dynamic length as everyday is updated)
Like:
Edit: using Office 2019 so SEQUENCE() function not working
Solution 1:[1]
put this in your first cell:
=WORKDAY(A1-1,SEQUENCE(NETWORKDAYS(A1,TODAY())))
This requires the dynamic array formula Sequence. It will spill the results down.
With out SEQUENCE, put this in the first cell and copy down till you get blanks and beyond if you want each new day to continue to appear:
=IF(WORKDAY(A1-1,ROW($ZZ1))>TODAY(),"",WORKDAY(A1-1,ROW($ZZ1)))
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |


