Paste below in your module and see if this gives you expected result.
Don't forget to remove formula in A1 or column will also be hidden.
Public Function ISOweeknum(ByVal v_Date As Date) As Integer
ISOweeknum = DatePart("ww", v_Date - Weekday(v_Date, 2) + 4, 2, 2)
End Function
Public Function ISOday(v_year As Integer, v_week As Integer, v_day As Integer) As Long
ISOday = 7 * (v_week - 1) + DateSerial(v_year, 1, 4) - Weekday(DateSerial(v_year, 1, 4), 2) + v_day
End Function
Sub HideCols()
Dim i As Long, stDate As Date
stDate = ISOday(Year(Date), ISOweeknum(Date), 1)
Application.ScreenUpdating = False
With ActiveSheet 'change to need
For i = 2 To .UsedRange.Columns.Count
.Columns(i).Hidden = False
If .Cells(1, i) < stDate Or .Cells(1, i) > stDate + 65 Then .Columns(i).Hidden = True
Next
End With
Application.ScreenUpdating = True
End Sub
Bookmarks