D
dchristo
I need to find the lowest values of a set of dates, I tried using
MinOfList()
Function MinOfList(ParamArray varValues()) As Variant
Dim i As Integer 'Loop controller.
Dim varMin As Variant 'Smallest value found so far.
varMin = Null 'Initialize to null
For i = LBound(varValues) To UBound(varValues)
If IsNumeric(varValues(i)) Then
If varMin <= varValues(i) Then
'do nothing
Else
varMin = varValues(i)
End If
End If
Next
MinOfList = varMin
End Function
But nothing happens, can someone please direct me on how to accomplish this?
Thank you
MinOfList()
Function MinOfList(ParamArray varValues()) As Variant
Dim i As Integer 'Loop controller.
Dim varMin As Variant 'Smallest value found so far.
varMin = Null 'Initialize to null
For i = LBound(varValues) To UBound(varValues)
If IsNumeric(varValues(i)) Then
If varMin <= varValues(i) Then
'do nothing
Else
varMin = varValues(i)
End If
End If
Next
MinOfList = varMin
End Function
But nothing happens, can someone please direct me on how to accomplish this?
Thank you