MROUND
Returns a number rounded to the desired multiple.
Syntax
expression.MROUND(arg1, arg2);
expression
- A variable that represents a ApiWorksheetFunction class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
arg1 | Required | ApiRange | ApiName | number | The value to round. | |
arg2 | Required | ApiRange | ApiName | number | The multiple to round the number to. |
Returns
number
Example
- Code
- Result
let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.MROUND(14.35, 0.4));