TRY NEW VERSION

LOGINV

LOGINV(arg1, arg2, arg3) → { number }

Returns the inverse of the lognormal cumulative distribution function of x, where ln(x) is normally distributed with the specified parameters.

Parameters:

Name Type Description
arg1 number

A probability associated with the lognormal distribution, a number between 0 and 1, inclusive.

arg2 number

The mean of ln(x).

arg3 number

The standard deviation of ln(x), a positive number.

Returns:

Type
number

Example

Copy code
builder.CreateFile("xlsx");

const oWorksheet = Api.GetActiveSheet();

//configure function parameters
var numbersArr = [0.5, 4, 7];

//set values in cells
for (var i = 0; i < numbersArr.length; i++) {
  oWorksheet.GetRange("A" + (i + 1)).SetValue(numbersArr[i]);
}

//get parameters
var probability = oWorksheet.GetRange("A1");
var mean = oWorksheet.GetRange("A2");
var standardDeviation = oWorksheet.GetRange("A3");

//invoke LOGINV method
var oFunction = Api.GetWorksheetFunction();
var ans = oFunction.LOGINV(probability, mean, standardDeviation);

//print answer
oWorksheet.GetRange("C1").SetValue(ans);

builder.SaveFile("xlsx", "LOGINV.xlsx");
builder.CloseFile();

Resulting document