EVEN
Rounds a positive number up and negative number down to the nearest even integer.
Syntax
expression.EVEN(arg1);
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. |
Returns
number
Example
This example shows how to round a positive number up and negative number down to the nearest even integer.
- Code
- Result
// How to round up a number.
// Use function to round up positive/negative numbers.
let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.EVEN(15.67));