View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Unhide Rows Date Older Than 7 Days


Sub hiderows()

'unhide everything
Cells.Select
Selection.EntireColumn.Hidden = False
LastRow = Cells(Rows.Count, "C").End(xlUp).Row
Set ColCRange = Range("C1:C" & LastRow)

For Each cell In ColCRange
If Date - cell.Value 7 Then
Cells.EntireRow.Hidden = True
End If

Next cell


End Sub
"Dean P." wrote:


I would like to create a macro to unhide rows in Sheet1 with Dates in Column
(C) that are older than 7 days old from current day. The Dates are in Column
(C) starting in row 2.

Please help me create this unhide macro.

Thanks,

Dean P.