Sub ApplyAutofiterToColumns_E_And_G()
Dim rngCell As Range
Application.ScreenUpdating = False
'assuming that the Filter is to be set in the first row of the active sheet
If Not ActiveSheet.AutoFilterMode Then
Range(Cells(1, 1), Cells(1, Cells(1, 1).End(xlToRight).Column)).AutoFilter
End If
For Each rngCell In Range(Cells(1, 1), Cells(1, Cells(1, 1).End(xlToRight).Column))
Select Case rngCell.Column
Case 5, 7
Case Else
rngCell.AutoFilter Field:=rngCell.Column, Visibledropdown:=False
End Select
Next rngCell
Application.ScreenUpdating = True
End Sub