Knobbi hat hier eine optimierte Fassung zur Ermittlung der Nummer eines Tages im Jahr präsentiert. Ich habe mal ein wenig weiter gebastelt und die Optionen Offset (neg/pos Versatz zu heute) und führende Nullen eingebaut (allg. Modul) in Word, Excel oder anderen Office Apps - Ach ja und Kalenderwoche und Monat dazugeklebt

Code: Alles auswählen
Option Explicit
Sub Test()
Dim iOff As Integer
On Error Resume Next
iOff = InputBox("Offset eingeben")
MsgBox "Tag " & DayOfYear(Date, iOff) & vbCrLf & "Woche " & CalendarWeek(Date, iOff) & vbCrLf & "Monat " & MonthNumber(Date, iOff), , Date + iOff
End Sub
Public Function DayOfYear(Optional ByVal Value As Date, Optional ByVal Offset As Long = 0) As String
If Int(Value) = 0 Then Value = Date
DayOfYear = Format(DatePart("y", Value + Offset), "000")
End Function
Public Function CalendarWeek(Optional ByVal Value As Date, Optional ByVal Offset As Long = 0) As String
If Int(Value) = 0 Then Value = Date
CalendarWeek = Format(DatePart("ww", Value + Offset, 2, 2), "00")
End Function
Public Function MonthNumber(Optional ByVal Value As Date, Optional ByVal Offset As Long = 0) As String
If Int(Value) = 0 Then Value = Date
MonthNumber = Format(Month(Value + Offset), "00")
End Function