Skip to main content

ISEVEN

Returns -true if a number is even.

Syntax

expression.ISEVEN(arg1);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe value to test.

Returns

boolean

Example

Return true if a number is even in a spreadsheet.

// How to check if the number is even in a spreadsheet.

// Use a function to check whether a number is even or not in a spreadsheet.

const worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
let result = func.ISEVEN("66");
worksheet.GetRange("C3").SetValue(result)