Hi,
I am trying to delete records from the sheet using the filter option
I have used the below code
Selection.AutoFilter
Range("B1").Select
Selection.AutoFilter Field:=2, Criteria1:="False"
Rows("42:42").Select
Range("B2").Activate
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
The above macro deletes the data only if the data starts from row 2 when filtered, the macro deletes only the records starting from row 42....
I used the macro record option ......
How do I deleted all the records when I use a filter option.
In the above case I am filtering the value False and I want to delete all the records under that option......
Kindly suggest.......
I am trying to delete records from the sheet using the filter option
I have used the below code
Selection.AutoFilter
Range("B1").Select
Selection.AutoFilter Field:=2, Criteria1:="False"
Rows("42:42").Select
Range("B2").Activate
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
The above macro deletes the data only if the data starts from row 2 when filtered, the macro deletes only the records starting from row 42....
I used the macro record option ......
How do I deleted all the records when I use a filter option.
In the above case I am filtering the value False and I want to delete all the records under that option......
Kindly suggest.......