ECMA_CEILING
Rounds the number up to the nearest multiple of significance. Negative numbers are rounded towards zero.
Syntax
expression.ECMA_CEILING(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 up. | |
| arg2 | Required | ApiRange | ApiName | number | The multiple of significance to round up to. |
Returns
number
Example
Round the number up to the nearest multiple of significance. Negative numbers are rounded towards zero in a spreadsheet.
// How to round up the number in a spreadsheet.
// Use function to round up a number to the nearest multiple of significance in a spreadsheet.
let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.ECMA_CEILING(1.567, 0.1));