View Single Post
  #2   Report Post  
tjtjjtjt
 
Posts: n/a
Default

Here is a programmatic solution that may work for you. This macro was taken
from:
http://www.exceltip.com/show_tip/Pri...Excel/520.html

If you are new to macros, look at before using the code below:
http://www.mvps.org/dmcritchie/excel/getstarted.htm


Function CountUniqueValues(InputRange As Range) As Long
Dim cl As Range, UniqueValues As New Collection
Application.Volatile
On Error Resume Next ' ignore any errors
For Each cl In InputRange
UniqueValues.Add cl.Value, CStr(cl.Value) ' add the unique item
Next cl
On Error GoTo 0
CountUniqueValues = UniqueValues.Count
End Function

Hope this helps,
tj