Dupes in a range
Hi Howard,
Am Sat, 28 May 2016 16:17:16 -0700 (PDT) schrieb L. Howard:
Very clever! Works perfect.
not clever enough. The line
TwoDigitDupes = "N"
should be out of the loop.
Try:
Function TwoDigitDupes(myRng As Range) As String
Dim rngC As Range
For Each rngC In myRng
If rngC 9 And rngC < 100 And Application.CountIf(myRng, rngC) 1 Then
TwoDigitDupes = "Y"
Exit Function
End If
Next
TwoDigitDupes = "N"
End Function
Regards
Claus B.
--
Windows10
Office 2016
|