Skip to main content

CEILING

Rounds a number up, to the nearest multiple of significance.

Syntax

expression.CEILING(arg1, arg2);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe value to round up.
arg2RequiredApiRange | ApiName | numberThe multiple of significance to round up to.

Returns

number

Example

This example shows how to round a number up, to the nearest multiple of significance.

// How to round a number up.

// Use function to round a number up the nearest integer or to the nearest multiple of significance.

let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.CEILING(1.23, 0.1));