Rounds a number to the nearest multiple of a significance value.
For a positive number and a positive significance value, the function rounds down (towards zero). For a negative number and a positive significance value, the function rounds down (away from zero). For a negative number and a negative significance value, the function rounds up (towards zero). The function returns an error if the number is positive and the significance value is negative.
Returns an integer value.
Number(required) is the number that is to be rounded, or a reference to a cell containing the number.
Significance(required) is the value, or a reference to a cell containing the value, to whose multiple Number is to be rounded.
If Number is positive and Significance is negative it returns an error.
|=FLOOR.XCL(14.5;4)||rounds down 14.5 to nearest multiple of 4||12|
|=FLOOR.XCL(-11;2)||rounds down -11 to nearest multiple of 2||-12|
|=FLOOR.XCL(-11;-2)||rounds up -11 to nearest multiple of 2 and negative sign will round up i.e. towards 0||-10|
|=FLOOR.XCL(7;4)||rounds down 7 to nearest multiple of 4||4|
|=FLOOR.XCL(11.5)||Significance value is required so it will return an error value||Err:511|
|=FLOOR.XCL(11,-2)||Significance value is negative but Number is positive so it will return an error value||Err:502|
Related LibreOffice functions:
Equivalent Excel functions: