I am using a solution from Leila Gharani on creating a sequence of week numbers across a list of dates:
=WEEKNUM(DATE(YEAR([@dates]),1,DAY([@dates]-WEEKDAY([@dates],3))))
Case 2: Using the WEEKDAY() function to reset the week number to 1 every time the first Monday of the next month is reached: https://www.xelplus.com/reset-week-number-every-month-excel/
While the solution works well, the sequencing does not correctly work across years. If possible, what modifications could I make to the formula to achieve this?

