Function FW(ladate As Date)
debut = DateSerial(Year(ladate) - IIf(Month(ladate) < 11, 1, 0), 11, 1)
lundidebut = debut - WorksheetFunction.Weekday(debut, 3)
fin = lundidebut + 363 'IIf(ladate < debut, 364, 0)
If WorksheetFunction.WeekNum(ladate, 2) = WorksheetFunction.WeekNum(debut, 2) Then
semaine = 1
Else
semaine = ((ladate - WorksheetFunction.Weekday(ladate, 3) - (lundidebut)) / 7) + 1
End If
FW = Year(ladate) + IIf(ladate > fin Or Month(ladate) > Month(fin), 1, 0) & "-" & Format(semaine, "00")
End Function