Hi Friends,
I managed to write a code to loop and find duplicates, it works if 'curcell' not blank. I wanted to skip to the next if 'curcell' value is blank. Any help please.
I tried to add ' if curcell <> "" then ', didnt succeed.
Thanks
Ajaar
I managed to write a code to loop and find duplicates, it works if 'curcell' not blank. I wanted to skip to the next if 'curcell' value is blank. Any help please.
I tried to add ' if curcell <> "" then ', didnt succeed.
Code:
Sub check()
For counter = 4 To 82
Set curcell = Sheet5.Cells(counter, 10)
If curcell.Value = curcell.Offset(0, -5).Value Then dname = curcell.Offset(0, -5).Value
Next counter
If dname <> "" Then
MsgBox "duplicate" & dname
End If
End If
End Sub
Thanks
Ajaar