excel vba‎ > ‎

VBA - Excel Filters - Turn On Excel AutoFilter

posted Jul 19, 2011, 8:40 AM by Roberto Felicini

Use the following Excel AutoFilter VBA code to turn on an Excel AutoFilter, if none exists

Sub TurnAutoFilterOn()
'check for filter, turn on if none exists
  If Not ActiveSheet.AutoFilterMode Then
    ActiveSheet.Range("A1").AutoFilter
  End If
End Sub
Comments