How do I change the color of the autofiler indicators?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

The autofilter indicators (the little black or blue triangles) are difficult
to tell the difference between unfiltered (black) or filtered (blue). Can I
change the default color for the filtered columns to something more
distinctive than the blue color?
 
Though you could change the colour of the filtered column header by
using a worksheet event?

Private Sub Worksheet_Change(ByVal Target As Range)
Dim af As AutoFilter
Dim fFilter As Filter
Dim iFilterCount As Integer

If ActiveSheet.AutoFilterMode Then
Set af = ActiveSheet.AutoFilter
iFilterCount = 1
For Each fFilter In af.Filters
If fFilter.On Then
af.Range.Cells(1, iFilterCount).Interior.ColorIndex =
6
Else
af.Range.Cells(1, iFilterCount).Interior.ColorIndex =
xlNone
End If
iFilterCount = iFilterCount + 1
Next fFilter
Else
Rows(1).EntireRow.Interior.ColorIndex = xlNone
End If

End Sub
 
Back
Top