Hy!!
I have a macro that applies a filter for cells with date, selects the visible cells, and deletes them.
The issue I have is that it deletes the entire Row not only the ones between Q:W
Below the Rows I want to delete I have other data that I wish to also maintain.
This is the code I use:
Sub Clean_Breaks()
Range("Q14:W231").Select
Selection.AutoFilter
Range("Q17").Select
ActiveSheet.Range("$Q$14:$W$23").AutoFilter Field:=1, Criteria1:= _
">01/01/2022", Operator:=xlAnd
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.EntireRow.Delete
ActiveSheet.ShowAllData
Selection.AutoFilter
Range("Q15").Select
End Sub
I attach a sample.
Thank you very much for your help.Forum_Breaks_Delete.xlsm
Bookmarks