Option Explicit
Sub Exclude_3()
Dim d As Object, c As Range, tmp As String, x, i As Long, ws As Worksheet
Set ws = ActiveSheet
Set d = CreateObject("scripting.dictionary")
x = Application.Transpose(Range("J2", Cells(Rows.Count, "J").End(xlUp)))
For i = 1 To UBound(x, 1)
d(x(i)) = 1
Next
For Each c In ws.Range("J2", Cells(Rows.Count, "J").End(xlUp)) '<< change Column/Range to suit
tmp = c.Value
If d.exists(tmp) And (tmp) = "1" Then d.Remove (tmp) '<< removes 1
If d.exists(tmp) And (tmp) = "5" Then d.Remove (tmp) '<< removes 5
Next
With ws.Cells(1, 1).CurrentRegion
.AutoFilter 10, Array(d.keys), 7
End With
End Sub