RattlingCarp3048
Board Regular
- Joined
- Jan 12, 2022
- Messages
- 202
- Office Version
- 365
- Platform
- Windows
i have a case number in column B where i need to filter to all line items containing " ARM" (space ARM) and delete those rows then unfilter. below is the line of code i have used many times in other worksheets without issues. when i manually filter it works as expected. however, when i test in VBA it filters to nothing. no data is shown and none has been deleted. when i try to record the macro i get an error message saying there are too many line continuations. Can someone help figure out what i am doing wrong?
ActiveSheet.Range("$A:$AA").AutoFilter Field:=2, Criteria1:=" ARM"
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A:$AA").AutoFilter Field:=2
ActiveSheet.Range("$A:$AA").AutoFilter Field:=2, Criteria1:=" ARM"
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A:$AA").AutoFilter Field:=2