Developer technologies | Visual Basic for Applications
An implementation of Visual Basic that is built into Microsoft products.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I need to count how many times the numbers have been repeated from an array.
I you can use VBA to that you can add your values from range, array to collection or dictionary.
count of it minus your values giving you a duplicate count.
Example
so
and code:
Sub ile_dubli()
'MVP OShon from VBAools.pl
Dim r As Range: Set r = Range("A1:C4")
Dim c As Range, col As New Collection
For Each c In r
On Error Resume Next
If Len(c) > 0 Then col.Add c, c
On Error GoTo 0
Next
Dim noEmpty&: noEmpty = Application.WorksheetFunction.CountA(r)
MsgBox "All cells " & noEmpty & " - " & col.Count & " unicue in collection" & _
" is " & noEmpty - col.Count & " as duplitates", vbInformation, "VBATools.pl"
End Sub