- vba autofilter multiple fields
- excel vba filter multiple criteria array
- excel vba filter multiple criteria same column
- vba filter more than 2 criteria
- vba autofilter 3 criteria
- vba advanced filter multiple criteria
Dim i As Long
i = Cells(Rows.Count, "A").End(xlUp).Row
ActiveSheet.Range("$A$1:$E$" & i).AutoFilter Field:=1, Criteria1:=Array("APAA", "APAB", "APAC"), Operator:=xlFilterValues
Where:
- i = total rows
- ("$A$1:$E$" & i) is a range from cell A1 until Ei where i = number of rows/ total rows. Change according to your requirement
- AutoFilter Field:=1 is column A. Change AutoFilter Field:=2 for column B or AutoFilter Field:=3 for column C and so on
- Criteria1:=Array("APAA", "APAB", "APAC"). Change "APAA","APAB","APAC" to your requirements. You can just simply add more criteria to filter
No comments:
Post a Comment