vba min
Sub TestMe()
Dim v(9), i As Byte
For i = 0 To 9
v(i) = Int(50 * Rnd) + 1
Next i
MsgBox Application.WorksheetFunction.Min(v)
MsgBox Application.WorksheetFunction.Max(v)
' Shorter: Application.Min(v) Application.Max(v)
End Sub