Macro to delete rows containing a date [Closed]

 tristanfey -

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 replies

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

Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

Is there a way to alter this to always use the current date?

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!