Skip to main content

ROUNDUP

Rounds a number up, away from zero.

Syntax​

expression.ROUNDUP(arg1, arg2);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters​

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberAny real number that will be rounded up.
arg2RequiredApiRange | ApiName | numberThe number of digits to round to. If this argument is negative, the number will be rounded to the left of the decimal point. If it is equal to zero, the number will be rounded to the nearest integer.

Returns​

number

Example​

Round a number up to the nearest integer in a spreadsheet.

// How do I round numbers up in a cell in a spreadsheet?

// Increase a number to its higher whole number or specified decimal place in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.ROUNDUP(3.456, 0));