Hello,
I am trying to delete the entire row/rows of specific data from a filtered table. As an example, I have data in columns A1:E600. From Column B, I want to delete the rows that contain the text "Active".
I have a used the following macro, but I am stuck when I want to remove the filter. Then filter on a different column and delete the criteria in that column.
Can someone please help or refer me to a great link?? Also, if there is a cleaner way than this code, please advise.
Thanks in advance!
I am trying to delete the entire row/rows of specific data from a filtered table. As an example, I have data in columns A1:E600. From Column B, I want to delete the rows that contain the text "Active".
I have a used the following macro, but I am stuck when I want to remove the filter. Then filter on a different column and delete the criteria in that column.
Code:
Worksheets("Sheet1").Range("A1").AutoFilter Field:=1, Criteria1:="Active"
Application.DisplayAlerts = False
ActiveSheet.UsedRange.Offset(1, 0).Resize(ActiveSheet.UsedRange.Rows.Count - 1).Rows.Delete
Application.DisplayAlerts = True
Selection.AutoFilter
Thanks in advance!