Product help with community knowledge

### Community Scoring

1 of 1 found this page helpful

### Tag Tags0

This page has no tags

### Page statistics

8925 views7 edit(s)7530 characters(s) Page last modified 09:42, 16 Feb 2012 by Joe_Charpentier

# Round Function in Formulas

##### Table of contents
No headers

Round Function In Formulas

Values in formulas can now be rounded up or down. For example, when riser height is calculated, one needs the function "round" to find the appropriate value.

Note: to use the round function on a value or parameter, it must not have any units (inches, meters2, etc.)  Be sure to divide or multiply by the appropriate units to neutralize the units. You can always restore the units of the rounded element as part of the formula.

ROUND(x)

The round function returns a number rounded nearest to a whole number. It doesn’t take into consideration rounding direction (round up or down). If the number is (for example) from 24.5 to 24.9, the function rounds it to 25. If it is from 23.1 to 23.4, the function rounds it to 23.

Examples:

round ( 23.4) = 23

Round ( 23.5) = 24

Round ( 23.6) = 24

Round (-23.4) = -23

Round (-23.5) = -23

Round (-23.6) = -24

Syntax

The syntax for the round function is: round( number)

number is the number to round.

ROUNDUP(x)

"x" is a unitless value that should return the largest integral value less than or equal to x.

For example:

roundup ( 23.0) = 23

roundup ( 23.5) = 24

roundup ( 23.9) = 24

roundup (-23.0) = -23

roundup (-23.5) = -23

roundup (-23.9) = -23

The syntax for the roundup function is: roundup (number)

number is the number to round up.

ROUNDDOWN(x)

"x" is a unitless value that should return the smallest integral value greater than or equal to x.

For example:

rounddown ( 23.0) = 23

rounddown ( 23.5) = 23

rounddown ( 23.9) = 23

rounddown (-23.0) = -23

rounddown (-23.5) = -24

rounddown (-23.9) = -24

The syntax for the rounddown function is: rounddown (number)

number is the number to round down.

Note that when numbers such as 23.5 are rounded, they can result in either 23 or 24. To produce a stable result, for all the .5 cases, we round to the larger integer. That means that 23.5 is rounded to 24, while -23.5 is rounded to -23.