$Round

From m204wiki
(Redirected from $ROUND)
Jump to navigation Jump to search

This function rounds a number to a specified number of decimal places.

Syntax

The format of the $ROUND function is:

$ROUND(number, places)

where:

  • number is the number to be rounded.
  • places is the number of significant decimal places to which the number should be rounded.

$ROUND returns the first argument, rounded to the number of decimal places specified in the second argument. If the second argument is negative, $ROUND returns the first argument unaltered and prints an error message. Omitted arguments are set to zero.

Example

$ROUND(200.565, 2) equals 200.57 $ROUND(200.565, 0) equals 201 $ROUND(200.565) equals 201 $ROUND(-200.565, 1) equals -200.6 $ROUND(-200.565, 2) equals -200.57