Skip to main content

MINA

Returns the smallest value in a set of values. Does not ignore logical values and text.

Syntax​

expression.MINA(args);

expression - A variable that represents an ApiWorksheetFunction class.

Parameters​

NameRequired/OptionalData typeDefaultDescription
argsRequirednumber | string | boolean | (number | string | boolean)[] | ApiRange | ApiNameUp to 255 values (number, text, logical value) for which the smallest value will be returned. The first argument is required, subsequent arguments are optional. Arguments can be numbers, logical values and text representations of numbers, names, ranges, or arrays.

Returns​

number

Example​

Find the smallest value in a list that includes text and logical values in a spreadsheet.

// What is the minimum value across mixed data types in a spreadsheet?

// Compare different value types to find the lowest one in a spreadsheet.

const worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
let minA = func.MINA(23, 45, true, "text", 0.89);
worksheet.GetRange("C1").SetValue(minA);