Private Sub Worksheet_Change(ByVal Target As Range)
Dim n&
If Not Intersect(Target, Range("b1:b2")) Is Nothing Then
Application.ScreenUpdating = False
Cells.EntireColumn.Hidden = False
If [b1] = "" Or [b2] = "" Then Exit Sub
On Error Resume Next
n = Application.Match(1 * DateSerial([b1], [b2], 1), Rows(1), 0)
On Error GoTo 0
If n <> 0 Then
Range(Cells(1, "d"), Cells(1, "d").End(xlToRight)).EntireColumn.Hidden = True
Cells(1, n).Resize(, Day(DateSerial([b1], [b2] + 1, 1) - 1)).EntireColumn.Hidden = False
End If
End If
End Sub