excel vba autofilter code example
Example 1: excel vba activate autofilter
If Sheets("Sheet1").AutoFilterMode = False Then
Sheets("Sheet1").Range("A1").AutoFilter
End if
Example 2: VBA to Autofilter
RangeObjectTableToFilter.AutoFilter Field:=ColumnCriteria, Criteria1:="ComparisonOperator" & RangeObjectCriteria.Value