Try this:
Add sub below to your module and amend your sub
replacing:
with:![]()
MsgBox "Done"
![]()
call AnyDuplicates
![]()
Sub AnyDuplicates() Dim cel As Range, rng As Range Set rng = Range("Z1").Resize(Range("Z" & Cells.Rows.Count).End(xlUp).Row) For Each cel In rng If cel.Value <> "" And cel.Row <> WorksheetFunction.Match(cel.Value, rng, 0) Then MsgBox "Duplicate found": Exit Sub End If Next cel End Sub
Bookmarks