Function Math Reals Class

MinReal

" Minimum Of Real Numbers" Return the minimum value of the numeric arguments. The arguments must contain strings or numbers, but not both. Function returns the leftmost of the minimum arguments.

Signature (Visual Basic / VBA)

Public Function MinReal( _
    ParamArray vArgs() As Variant _
    ) As Variant

Code Example

    MinReal(23) = 23
    MinReal(23, 12) = 12
    MinReal(12, 45, 23) = 12
    IsNull(MinReal) = True

Parameters

Parameter Description
vArgs One or more numeric arguments, the minimum of which is returned. Function returns Null if there are no arguments.

Notes & Version History

Note If all arguments happen to be strings, they will be compared using Binary comparisons.
Note This function will generate an error if any of the arguments are not compatible, such as if one is a string and another is numeric.
Note This function does not support three-valued logic. The behavior of this function is undefined if any of the arguments are Null.