Skip to main content

FLOOR

Rounds a number down to the nearest multiple of significance.

Syntax

expression.FLOOR(arg1, arg2);

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

NameRequired/OptionalData typeDefaultDescription
arg1RequiredApiRange | ApiName | numberThe numeric value to round down.
arg2RequiredApiRange | ApiName | numberThe multiple of significance to round down to. The number to round down and the multiple of significance must have the same sign.

Returns

number

Example

Round a number down to the nearest multiple of significance in a spreadsheet.

// How to round a number down to the nearest multiple of significance in a spreadsheet.

// Use function to round down in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.FLOOR(5.786, 0.7));