Dim rngData As Range
Dim rngFlt As Range
Dim rngCrt As Range
Set rngData = Range("A1").CurrentRegion
Set rngFlt = Range("G1")
Set rngCrt = Range("E2")
rngFlt = rngData(1, 1)
rngFlt.Offset(1) = "=""*""& " & rngCrt.Address & " & ""*"""
rngData.AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=rngFlt.Resize(2), CopyToRange:=Range("J1"), Unique:=True
|