Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does this work for you? Note that UnhideEm just unhides all rows. Should
be okay unless you want some other rows hidden for some reason. HTH, James Sub HideOld() Dim k As Long For k = 10 To Cells(10, "d").End(xlDown).Row If Cells(k, "d") < Now - 7 Then Rows(k).EntireRow.Hidden = True Next k End Sub Sub UnhideEm() Rows.Hidden = False End Sub "Joe K." <Joe wrote in message ... Please help me create two macros. First macro, starting with row 10 if dates are older than 7 days (Date Column D) old then hide them from Sheet1 worksheet. Next macro to unhide all hidden rows starting from row 10 until cell is empty or null using column A determine if the cell is hidden from Sheet1 worksheet. The example listed below the macro should hide 10/01/07 and 10/02/07 since today is 10/10/07. Thanks so much!!!!!!! Example Column D 10/01/07 10/02/07 10/03/07 10/04/07 10/05/07 10/06/07 10/07/07 10/08/07 10/09/07 10/10/07 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Enabling option „Format rows“ to hide/unhide rows using VBA-code? | Excel Discussion (Misc queries) | |||
Hide Unhide Rows | Excel Discussion (Misc queries) | |||
Hide/Unhide Rows | Excel Programming | |||
Hide/Unhide Columns representing dates as per Current System Date! | Excel Programming | |||
How to hide and unhide rows | Excel Programming |