min(
VALUE1
,
VALUE2
,
VALUE3
,
VALUE4
,
VALUE999
)

The min( function compares a series of values and returns the smallest value.

Parameters

This function has five parameters:

value1 – The first text or numeric value (required).

value2 – The second text or numeric value (required).

value3 – The third text or numeric value (optional).

value4 – The fourth text or numeric value (optional).

value999 – This function allows an unlimited number of additional values.

Description

The min( function compares a series of values and determines the smallest value. Although it states above that the function has five parameters, it actually has no limit - you can enter as many numerical values as you like.

This example calculates the coldest city, LA or NY.

`````` min(LosAngelesTemp,NewYorkTemp)
``````

If you need to calculate the minimum of three or more values you can supply additional parameters like this.

``````min(LosAngelesTemp,NewYorkTemp,ChicagoTemp,SeattleTemp,DenverTemp)
``````

You can use an unlimited number of parameters with this function.

In addition to numbers, the min( function can also be used with text values. However, you cannot mix text and numeric parameters – they must either be all numeric, or all text. (Of course you can convert numeric values to text with the str( or pattern( functions, or convert text to numbers with the val( function.

Here are some example of the min( function in action:

``````min(5,3,7,9) ☞ 3
min(4,-7,23) ☞ -7
min("x","b","g") ☞ b
min(254,"zero") ☞ Error!
``````

Error Messages

min( function must have at least two parameters – You’ll see this error message if you supply only one parameter, or no parameters at all.

min( function parameters must be either all text or all numbers. – You’ll see this error message if you mix text and numbers in the parameter list (for example min(3,“hello”).