Hi,
I don't believe that this task can be done using a formula!
You definitely need to VBA code associated with an event to do so.
So, I would suggest this one:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Application.EnableEvents = False
If Not Intersect(Target, Range("A:A")) Is Nothing Then
Range("A:A").RemoveDuplicates Columns:=1, Header:=xlYes
End If
On Error GoTo 0
Application.EnableEvents = True
End Sub
Please find it in the attached file.
Try to enter a duplicate barcode and see how it will be gone immediately.
And, please note that this code is only applied to column A, but you can modify it as you want.
Hope that helps