Skip to content

Instantly share code, notes, and snippets.

@smockle
Created March 3, 2014 05:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smockle/9319099 to your computer and use it in GitHub Desktop.
Save smockle/9319099 to your computer and use it in GitHub Desktop.
Hides rows containing past dates.
Sub Hide_Dates()
Dim MyRange As Range, c As Range
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Set MyRange = Range("A1:A4436")
MyRange.EntireRow.Hidden = False
For Each c In MyRange
If IsDate(c.Value) And c.Value < Date Then
c.EntireRow.Hidden = True
End If
Next
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment