$Round: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
 
m (Mlarocca moved page $ROUND to $Round: Lower case change)
 
(No difference)

Latest revision as of 14:26, 29 July 2014

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