Hi Excel Fox

I have tried to automate your formula using VBA code, but it returns true for all the items

Sub Dup_Val_SameRef()

Code:
     Dim LR As Long
    LR = Cells(Rows.Count, "D").End(xlUp).Row
       Range("I2:I" & LR).ClearContents
   
    Range("I2:I" & LR).FormulaArray = "=ISNA(IF(ISBLANK(RC[-3]),MATCH(RC[-4]&RC[-2],RC[-4]:R[398]C[-4]&RC[-3]:R[398]C[-3],0),MATCH(RC[-4]&RC[-3],RC[-4]:R[398]C[-4]&RC[-2]:R[398]C[-2],0)))"
End Sub
It would be appreciated if you could assist me in resolving this

https://www.dropbox.com/s/kc4sar8klw...lues.Macro.xls