Edson,
Funcionou com a alteração abaixo,
Function NumUniqueValues(Rng As Range) As Long
Dim mycell As Range, UniqueVals As New Collection
Application.Volatile
On Error Resume Next
For Each mycell In Rng
If Not mycell.EntireRow.Hidden Then
UniqueVals.Add mycell.Value, CStr(mycell.Value)
End If
Next mycell
On Error GoTo 0
NumUniqueValues = UniqueVals.Count
End Function
Valeu demais!
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 19/04/2010 7:01 am