Calculate maximum of array of numbers
or Minimum of array of numbers
Also, the Min_No0s will get the min ignoring zeros in the array
Function Max(arrNumbers)
Dim Result
Result = arrNumbers(0)
for each i in arrNumbers
If i > Result then
Result = i
End if
Next
Max = Result
End function
' Returns the numerically lowest value from a given array.
Function Min(arrNumbers)
Dim Result
Result = arrNumbers(0)
for each i in arrNumbers
if i < Result then
Result = i
end if
next
Min = Result
End function
Function Min_No0s(arrNumbers)
Dim Result
Result = arrNumbers(0)
For Each i in arrNumbers
If i < Result And I < > 0 Then
Result = i
End if
Next
Min_No0s = Result
End function
Dim Result
Result = arrNumbers(0)
for each i in arrNumbers
If i > Result then
Result = i
End if
Next
Max = Result
End function
' Returns the numerically lowest value from a given array.
Function Min(arrNumbers)
Dim Result
Result = arrNumbers(0)
for each i in arrNumbers
if i < Result then
Result = i
end if
next
Min = Result
End function
Function Min_No0s(arrNumbers)
Dim Result
Result = arrNumbers(0)
For Each i in arrNumbers
If i < Result And I < > 0 Then
Result = i
End if
Next
Min_No0s = Result
End function
arrNumbers
Views 1,178
Downloads 403
CodeID
DB ID
ANmarAmdeen
610
Revisions
v1.0
Tuesday
December
31
2019