Hi All, Using Excel 2013
I'm running a macro that hides rows that are greater than today's date in Range I29:I79.
The macro below runs the macro correctly. I want to add a second range in the same macro I82:I132 but haven't got it to work.
I added in the line Set MyRange = Range("I29:I79", ("I82:i132") but receive an error message saying invalid reference.
Any help trying to get the two ranges to work in the same macro, thanks.
Mike






Sub Hide_Dates()
Dim MyRange As Range, c As Range
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Set MyRange = Range("i29:i79")
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