MAXA

function MAXA(args: number | string | boolean | [] | ApiRange = null): number

Description

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

Parameters

argsnumber | string | boolean | [] | ApiRangedefault: null

Up to 255 values (number, text, logical value) for which the largest value will be returned. The first argument is required, subsequent arguments are optional.

Returns

number

Try It


const oWorksheet = Api.GetActiveSheet();
var oRange = oWorksheet.GetRange("A1:A5").GetValue();
var oFunction = Api.GetWorksheetFunction();
var maxA = oFunction.MAX(23, 45, true, "text", 0.89);
oWorksheet.GetRange("C1").SetValue(maxA);

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).