Function SemISO(dat As Date) As Integer '----------------- L.Longre
Dim a As Integer
a = Int((dat - DateSerial(Year(dat), 1, 1) + _
((WeekDay(DateSerial(Year(dat), 1, 1)) + 1) _
Mod 7) - 3) / 7) + 1
If a = 0 Then
a = SemISO(DateSerial(Year(dat) - 1, 12, 31))
ElseIf a = 53 And (WeekDay(DateSerial(Year(dat), 12, 31)) - 1) _
Mod 7 <= 3 Then
a = 1
End If
SemISO = a
End Function