As far as I know, it is impossible to filter using AutoFilter using criteria where one field should correspond to another field without using an auxiliary field (column). Of course, this is possible using a filter of several fields, but then criteria must be set for each field, and the criteria cannot be a formula that refers to the same row in the table, for example.
The only thing I could think of was using conditional formats and then filtering by color.
Example:

Sub Makro1() sConditionalFormula = "=AND($A1<>"""",$B1<>"""",$A1=$B1)" 'FormatConditions needs localized formulas, so we create such: Cells(Rows.Count, Columns.Count).Formula = sConditionalFormula sConditionalFormulaLocal = Cells(Rows.Count, Columns.Count).FormulaLocal Cells(Rows.Count, Columns.Count).Clear With ActiveSheet With .Range("A1").CurrentRegion .FormatConditions.Delete .FormatConditions.Add Type:=xlExpression, Formula1:=sConditionalFormulaLocal With .FormatConditions(.FormatConditions.Count) With .Interior .Color = RGB(255, 255, 0) End With End With .AutoFilter Field:=1, Criteria1:=RGB(255, 255, 0), Operator:=xlFilterCellColor End With End With End Sub
Result:

source share