Count Unique Entries
Upon rereading, I am thinking you want the number of unique entries in all
columns combined. You could try a UDF. Paste into an excel module and call
it like
=Unique(A1:A5, C1:C5)
Function Unique(ParamArray Rng() As Variant)
Dim i As Long
Dim t As Long
Dim x As Range
Dim Temp As Collection
On Error Resume Next
Set Temp = New Collection
For i = 0 To UBound(Rng())
For t = 1 To Rng(i).Areas.Count
For Each x In Rng(i).Areas(t).Cells
Temp.Add Trim(x.Value), CStr(Trim(x.Value))
Next x
Next t
Next i
Unique = Temp.Count
End Function
"SouthCarolina" wrote:
I am trying to count unique entries across a set of colums. For example,
A C
3 4
2 4
4 7
2 1
1 0
I want the result to be 5 as the number of unique entries. The entries are
not in consecutives column.
Thanks
|