View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Breakfast Guy[_7_] Breakfast Guy[_7_] is offline
external usenet poster
 
Posts: 1
Default Hiding rows based on a date function


Try this:

Sub hide_rows()
Dim i As Long
For i = Range("Y" & Rows.Count).End(xlUp).Row To 2 Step -1
If Range("Y" & i).Value < "" And Range("Y" & i) <= Date - 100 Then
Range("Y" & i).EntireRow.Hidden = True
End If
Next i
End Sub


--
Breakfast Guy

Regards,
Breakfast Guy
Forum Moderator
www.thecodecage.com
------------------------------------------------------------------------
Breakfast Guy's Profile: http://www.thecodecage.com/forumz/member.php?userid=5
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=23938