Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Excel.Application.EnableEvents = False
Dim sht As Worksheet
Set sht = Target.Parent
If Target.Row = 1 And Target.Column = 10 Then
If Target <> "" Then
sht.Range("A1").AutoFilter Field:=3, Criteria1:=Target.Value, visibledropdown:=False
Else
sht.Cells.AutoFilter
sht.Range("A1").AutoFilter Field:=7, Criteria1:="="
End If
End If
Set sht = Nothing
Excel.Application.EnableEvents = True
End Sub