I am using VBA to add filters and delete using the below script
myRange1.AutoFilter Field:=3, Criteria1:="=09"
myRange1.SpecialCells(xlCellTypeVisible).EntireRow.Copy
Sheets("Removal Of 09 Range").Select
Range("A1").Select
ActiveSheet.Paste
Sheets("IP - BT Calls").Select
myRange2.SpecialCells(xlCellTypeVisible).EntireRow.Delete
but the problem is that if the range has no data then I get an error, how can I make it so that if there is no data within the range then it will skip this line of the code
myRange2.SpecialCells(xlCellTypeVisible).EntireRow.Delete
myRange1.AutoFilter Field:=3, Criteria1:="=09"
myRange1.SpecialCells(xlCellTypeVisible).EntireRow.Copy
Sheets("Removal Of 09 Range").Select
Range("A1").Select
ActiveSheet.Paste
Sheets("IP - BT Calls").Select
myRange2.SpecialCells(xlCellTypeVisible).EntireRow.Delete
but the problem is that if the range has no data then I get an error, how can I make it so that if there is no data within the range then it will skip this line of the code
myRange2.SpecialCells(xlCellTypeVisible).EntireRow.Delete