I've made a dynamic calendar that uses just one formula. It works almost perfectly, except there are issues with some of the months. For example, February, March and November 2021 all contain the last week of the previous month, despite the start day being Tuesday. It should only display weeks where there is a day belonging to the active month.
Please download the workbook at https://easyupload.io/r6n9xy.
Excel Formula:
=LET(MonthYear,$F$4&$D$4,
SEQUENCE(
ROUNDUP((DAY(EOMONTH(MonthYear,0))+WEEKDAY(MonthYear,B5))/7,0),
7,
(MonthYear)-WEEKDAY(MonthYear,B5),
1
)
)
Please download the workbook at https://easyupload.io/r6n9xy.