Max + Min + Min_No0s

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

CodeFunctionName
What is this?

Public

Tested

Original Work
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

arrNumbers

Views 1,174

Downloads 402

CodeID
DB ID

ANmarAmdeen
608
Attachments
Revisions

v1.0

Tuesday
December
31
2019