When filtering a column, the header row is to be highlighted with a yellow background color
Insert the following code in the appropriate modules.
Place the code below into the standard module.
Private Sub Worksheet_Calculate() Dim flt As Filter Dim intCol As Integer For Each flt In ActiveSheet.AutoFilter.Filters intCol = intCol + 1 If flt.On Then Cells(1, intCol).Interior.ColorIndex = 6 Else Cells(1, intCol).Interior.ColorIndex = xlColorIndexNone End If Next flt End Sub
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.