Hello All,
I have a column in a sheet which is date and has dates from last 2 months and now
How do I write macro to make sure it deletes all the date which is less then current date
Thanks
Venkat
Hello All,
I have a column in a sheet which is date and has dates from last 2 months and now
How do I write macro to make sure it deletes all the date which is less then current date
Thanks
Venkat
Hi,
The principal is shown in the following VBA code:
*** you should choose and use only one of the two IF statements.![]()
Sub Del_Old_Dates() LR = Cells(Rows.Count, 1).End(xlUp).Row For R = LR To 1 Step -1 If Cells(R, 1) < Date Then Cells(R, 1) = "" If Cells(R, 1) < Date Then Cells(R, 1).EntireRow.Delete Next End Sub
HTH,
Elm
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks