View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
JB
 
Posts: n/a
Default delete entirerow if date more than 12months old

http://cjoint.com/?fzqFMePa5S

Sub test()
coldep = 2
For i = 2 To Cells(65000, coldep).End(xlUp).Row
If Cells(i, coldep) < DateSerial(Year(Date), Month(Date) - 12,
Day(Date)) Then
Rows(i).Hidden = True ' replace Hidden by delete
End If
Next i
End Sub


Cordialy JB