AVERAGEA
function AVERAGEA(args: number | string | number[] = null): number
Description
Returns the average (arithmetic mean) of the specified arguments, evaluating text and false in arguments as 0; true evaluates as 1.
Parameters
- args
number | string | number[]
null Up to 255 numeric values for which the average value will be returned. The first argument is required, subsequent arguments are optional. Arguments can be numbers or names, arrays or references that contain numbers, text representations of numbers, or logical values, such as true and false.
Returns
number
Try It
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
var ans = oFunction.AVERAGEA(78, 98, 46, 123, 45, true, false);
oWorksheet.GetRange("B2").SetValue(ans);