Sub HideColumnsOnDate()
Dim v As Variant
Dim CelDate As Date
Dim Def As String
Dim iDate As Date
Dim R As Range
Dim Cel As Range
Dim unhide As Range
Dim hide As Range
Def = Format(Now(), "mm/dd/yyyy")
v = Application.InputBox("Please Enter a date", "Enter a Date", Def, Type:=1)
If IsError(v) Then Exit Sub
If v = "" Then Exit Sub
iDate = Int(v)
If IsDate(iDate) = False Then Exit Sub
Set R = Range(Range("A11"), Range("ZZ11"))
For Each Cel In R
CelDate = Int(Cel.Value)
If Cel.Value <> "" And Cel.Value > 0 And IsDate(CelDate) Then
If iDate > CelDate Then
If Not hide Is Nothing Then
Set hide = Union(hide, Cel)
Else
Set hide = Cel
End If
Else
If Not unhide Is Nothing Then
Set unhide = Union(unhide, Cel)
Else
Set unhide = Cel
End If
End If
End If
Next Cel
If Not hide Is Nothing Then
hide.EntireColumn.Hidden = True
End If
If Not unhide Is Nothing Then
unhide.EntireColumn.Hidden = False
End If
End Sub