Start der Function in Zelle "A3"
29.11.2004 23:10:53
Jupp
Ich möchte, dass die anhängende Funktion beim Start, anstatt in Zelle "A1"
in Zelle "A3" beginnt, ich weiß aber nicht was ich ändern muß.
Vieleicht kann mir einer dabei helfen. Danke schon mal im voraus.
Josef Thelen
Sub DatumUndKW()
Dim iCount As Integer, iCounter As Integer
If Month(DateSerial(Year(Date), 2, 29)) = 2 Then
iCount = 366
Else
iCount = 365
End If
For iCounter = 1 To iCount
Cells(iCounter, 1) = DateSerial(Year(Date), 1, iCounter)
Cells(iCounter, 2) = DINWeek(Cells(iCounter, 1))
Next iCounter
End Sub
Private Function DINWeek(dat As Date) As Integer
Dim dbl As Double
dbl = DateSerial(Year(dat + (8 - Weekday(dat)) Mod 7 - 3), 1, 1)
DINWeek = (dat - dbl - 3 + (Weekday(dbl) + 1) Mod 7) \ 7 + 1
End Function