Hello and welcome to MrExcel.
This came from John Walkenbach if I remember correctly. Insert this UDF in a standard module:
Code:
Function FilterCrit(Rng As Range) As String
Dim Filter As String
Filter = "{All}"
With Rng.Parent.AutoFilter
If Intersect(Rng, .Range) Is Nothing Then GoTo Finish
With .Filters(Rng.Column - .Range.Column + 1)
If Not .On Then GoTo Finish
Filter = .Criteria1
Select Case .Operator
Case xlAnd
Filter = Filter & " AND " & .Criteria2
Case xlOr
Filter = Filter & " OR " & .Criteria2
End Select
End With
End With
Finish:
FilterCrit = Filter
End Function
Then on your worksheet enter the formula
=filtercrit(A3)
where A3 is within the range being filtered.