Hi All,
I wrote the following VBA code to check for duplicates in a column in my worksheet, but it is not working. Please, I would be grateful if someone in the forum will help me out.
[VBA]Function CheckforDuplicateBarcodes(columnname As Integer)
Dim rowcount
Dim R
rowcount = Range("A65536").End(xlUp).Row
For R = 2 To rowcount
myCheck = ActiveCell
If ActiveCell = myCheck Then
Sheet1.Cells(R, columnname).Interior.ColorIndex = 5
End If
Next
End Function
Sub Duplibutton()
CheckforDuplicateBarcodes (14)
End Sub[/VBA]
Thanks
Lucpian