Macro to delete rows containing a date

Closed
masterp - Oct 26, 2009 at 04:48 AM
 tristanfey - Oct 27, 2011 at 04:39 PM
Hello,

On a daily basis I populate data on different worksheets. Meaning on each day I have to delete T-2 data to populate T-1 data.

I would like a macro to select a date to delete rows from each worksheet containing the date in Column A

Your assistance will be greatly appreciated

Kind Regards

Master P

2 responses

Blocked Profile
Oct 31, 2009 at 04:52 AM
Dear Sir,

Please use the following and insert the specific date in the place of DATE:

EndCount = Range("DateCount").Value '# of rows
application.Goto Reference:="DateStart"

For LoopCount = 1 To EndCount Step 1
If ActiveCell.Value = "DATE" Then
Selection.EntireRow.Hidden = True
End If
ActiveCell.Offset(1, 0).Activate
Next LoopCount

Thanks.
1
Is there a way to alter this to always use the current date?
0