Hi everyone,
I need an User definied function for find the "Max Value of a Collection". I resaerched on the net, Excel's help and tried some ways to solve but i couldn't succeed. Could you help me please?
[VBA]Public Function CountUniqueValues(InputRange As Range) As Long
Dim CeL As Range, UniqueValues As New Collection
Application.Volatile
On Error Resume Next
For Each CeL In InputRange
UniqueValues.Add CeL.Value, CStr(CeL.Value)
Next
On Error GoTo 0
CountUniqueValues = UniqueValues.Count
End Function[/VBA]
For example we can find teh count of a Collection via this UDF but i need max value of the collection.
Thanks in advance.