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 negative significance value, the direction of rounding is determined by the value of a mode parameter. The function returns an error if the number and significance values have opposite signs.
FLOOR(Number [; Significance[; Mode]])
Returns an integer value.
Number is the number that is to be rounded, or a reference to a cell containing the number.
Significance (optional) is the value, or a reference to a cell containing the value, to whose multiple Number is to be rounded. It defaults to +1 or -1 depending on the sign of Number.
Mode (optional) is a number, or a reference to a cell containing a number. The function only uses Mode if both Number and Significance are negative. Then if Mode is given and not equal to zero, numbers are rounded up (towards zero); if Mode is equal to zero or not given, negative numbers are rounded down (away from zero).
|=FLOOR(11.5)||rounds down 11.5 to nearest multiple of +1(default)||11|
|=FLOOR(-11.5)||rounds down -11.5 to nearest multiple of -1(default)||-12|
|=FLOOR(-11;-2)||rounds down -11 to nearest multiple of -2||-12|
|=FLOOR(-10;-3;1)||rounds up -10 to nearest multiple of -3 under mode 1 which is not 0 hence result will be towards 0(rounded up)||-9|
|=FLOOR(-11.67;-2;0)||rounds down -11.67 to nearest multiple of -2 under mode 0 i.e. away from 0(rounded down)||-12|
|=FLOOR(-11.67;-2;1)||rounds up -11.67 to nearest multiple of -2 under mode 1 which is not 0 hence result will be towards 0(rounded up)||-10|
|=FLOOR(11.5;-1)||rounds down 11.5 to nearest multiple of -1 but due to opposite sign this will return an error value||Err:502|
Related LibreOffice functions:
Equivalent Excel functions: