FLOOR.MATH function

FLOOR.MATH(Number, Significance?, Mode?) FLOOR.MATH(Number; Significance?; Mode?)

Number

Number or { Number }

The number to be rounded.

Significance

Number or { Number } (optional)

The multiple to which the input number should be rounded. If omitted, it is assumed to be 1.

Mode

Number or { Number } (optional)

0 if the number should be rounded toward zero and 1 if the number should be rounded away from zero. If omitted, it is assumed to be 0.

Returns

Number or { Number }

The rounded number.

Returns a number rounded down to the nearest multiple of another number. FLOOR.MATH(22)FLOOR.MATH(22) and FLOOR.MATH(22.1)FLOOR.MATH(22,1) both return 22.

If a significance is not specified, it is assumed to be 1, meaning that the returned value is an integer. FLOOR.MATH(22.1, 5)FLOOR.MATH(22,1; 5) returns 20, because 20 is the nearest multiple of 5 that 22.1 can be rounded down to.

Negative numbers are rounded towards zero by default. That means that FLOOR.MATH(-22.1, 5)FLOOR.MATH(-22,1; 5) returns -25, not -20. The third parameter may be used to customize this behavior. FLOOR.MATH(-22.1, 5, 1)FLOOR.MATH(-22,1; 5; 1) returns -20, not -25.

Examples

FLOOR.MATH(22)FLOOR.MATH(22)

Returns 22, assuming a significance of 1.

FLOOR.MATH(22.1)FLOOR.MATH(22,1)

Returns 22, assuming a significance of 1.

FLOOR.MATH(22.1, 1)FLOOR.MATH(22,1; 1)

Returns 22, with the significance given as the second parameter.

FLOOR.MATH(22.1, 5)FLOOR.MATH(22,1; 5)

Returns 20, with the significance given as the second parameter.

FLOOR.MATH(-22.1, 5, 1)FLOOR.MATH(-22,1; 5; 1)

Returns -20, because the third parameter is set to a value that causes negative numbers to be rounded away from zero.

FLOOR.MATH({ 22, 22.1 })FLOOR.MATH({ 22; 22,1 })

Returns the array { 22, 22 }{ 22; 22 }.

FLOOR.MATH({ 22, 22.1 }, 1)FLOOR.MATH({ 22; 22,1 }; 1)

Returns the array { 22, 22 }{ 22; 22 }.

FLOOR.MATH({ 22, 22.1 }, 5)FLOOR.MATH({ 22; 22,1 }; 5)

Returns the array { 20, 20 }{ 20; 20 }.

FLOOR.MATH({ 22, 22.1 }, { 5, 1 })FLOOR.MATH({ 22; 22,1 }; { 5; 1 })

Returns the array { 20, 22 }{ 20; 22 }. 22 uses a significance of 5 and 22.1 uses a significance of 1.