I want to perform this functions in this order:
1. Activate auto-filter function
2. In column M, tick 'deposit reversed' and 'blank'
3. Delete entire rows for cell that contain 'AQ*', 'AI*', 'BG' in column C. (NOTE: * represents numbers after the alphabets)
I have tried macro recording using Auto Filter but it only delete rows up to a specified range (which may differ if I use other set of data). VBA as per below.
Is there any EASIER/BETTER way to perform this?
Appreciate your help!
Sub Macro4()
'
' Macro4 Macro
'
'
Rows("1:1").Select
Application.CutCopyMode = False
Selection.AutoFilter
ActiveSheet.Range("$A$1:$N$46437").AutoFilter Field:=13, Criteria1:= _
"=Deposit Reversed", Operator:=xlOr, Criteria2:="="
ActiveSheet.Range("$A$1:$N$46437").AutoFilter Field:=3, Criteria1:=Array( _
"AQ", "AQ01E166N", "AQ01E294N", "AQ01E316N", "AQ01E373N"), Operator:= _
xlFilterValues
Rows("2:2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A$1:$N$46017").AutoFilter Field:=3, Criteria1:=Array( _
"AI", "AI04_MMRASHI_TWT", "AI04E230N", "AI04E269N", "AI04E323N"), Operator:= _
xlFilterValues
ActiveWindow.SmallScroll Down:=-6
Rows("10236:10236").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A$1:$N$45998").AutoFilter Field:=3, Criteria1:=Array( _
"BG", "BG01A004", "BG01H082", "BG01H106N"), Operator:=xlFilterValues
ActiveWindow.SmallScroll Down:=-3
Rows("5:5").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
End Sub