Sequentially numbered weeks between start and end dates

I have this example data:
enter image description here

  • The data in the range B1:I1 is from this formula: =SEQUENCE(,8,DATE(2025,1,25),7).

  • The full formula will likely go from 28-Dec-2024 for 53 columns – 7 day gaps giving me each Saturday start date in 2025.

  • The values in column A are manually typed in (variations of d/m/y format):

     2/2/25-16/2/25, 
     02/03/2025-16 Mar 25
    
     25/1/25-25/1/25,
     15/03/25-15/03/25
    

Question:
What I’m trying to do is sequentially number each week that is covered by the date ranges in column A, unless there is a gap of six weeks in which case the numbering should start at 1 again.

This formula would turn the values in cell A2 into actual dates: =DATEVALUE(TEXTSPLIT(CLEAN(A2),"-",","))

or this would return the Saturday start of the week and the Friday end of the week:

=LET(AllDates,DATEVALUE(TEXTSPLIT(CLEAN(A2),"-",",")),
     StartDates,CHOOSECOLS(AllDates,1)+1-WEEKDAY(CHOOSECOLS(AllDates,1)+1,1),
     EndDates,CHOOSECOLS(AllDates,2)+1-WEEKDAY(CHOOSECOLS(AllDates,2)+1,1)+6,
     HSTACK(StartDates,EndDates))

The formula =BYCOL($B$1#,LAMBDA(ThisDate,IF(AND(ThisDate>=$A5,ThisDate<=$B5),1,""))) would add a 1 under the correct week for one set of dates. Here A5 and B5 are the first two dates returned by my date formula.

enter image description here

I just can’t get it all in one neat formula for each row, let alone the sequential numbering. I’d love it if I could just add a formula to B2 and drag-down.

Any suggestions are very welcome.