For a specific year, you can do this as follows:
DateAdd("ww", WeekNumber - 1, DateSerial(2017, 1, 5))
And check this out:
Debug.Print Format(DateAdd("ww", WeekNumber - 1, DateSerial(YearNumber, 1, 5)), "ddd d MMM yy")
If others look at it and do not want Thursday or do not work in 2017 :
Verification Code:
Sub test() Debug.Print Format(GetDayFromWeekNumber(2017, 1, 4), "ddd d MMM yyyy") End Sub
And the general function of GetDayFromWeekNumber :
Public Function GetDayFromWeekNumber(InYear As Integer, _ WeekNumber As Integer, _ Optional DayInWeek1Monday7Sunday As Integer = 1) As Date Dim i As Integer: i = 1 If DayInWeek1Monday7Sunday < 1 Or DayInWeek1Monday7Sunday > 7 Then MsgBox "Please input between 1 and 7 for the argument :" & vbCrLf & _ "DayInWeek1Monday7Sunday!", vbOKOnly + vbCritical 'Function will return 30/12/1899 if you don't use a good DayInWeek1Monday7Sunday Exit Function Else End If Do While Weekday(DateSerial(InYear, 1, i), vbMonday) <> DayInWeek1Monday7Sunday i = i + 1 Loop GetDayFromWeekNumber = DateAdd("ww", WeekNumber - 1, DateSerial(InYear, 1, i)) End Function
source share