This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v19
ROUND

ROUND 


 

ROUND ( value , places ) 
Parameter Type   Description
value  Number in Number to round
places  Number in Number of decimal places

The ROUND function rounds the specified value to the nearest number, using the specified number of decimal places.

Use the value parameter to specify the number to round. You can pass any numeric data (or cell reference containing numeric data).

Note: The result may be rounded up or rounded down.

Use the places parameter to specify the number of decimal places. The places argument has these rules:

  • Set places to a value >0 to round to the specified number of decimal places.
  • Set places to zero to round to the nearest whole number.
  • Set places to a value <0 to round the value left of the decimal to the nearest ten, hundred, etc.

Example  

ROUND(A3,-2)

ROUND(C4,B2)

ROUND(PI(),5) //3.14159

ROUND(29.2,-2) //0 because 29.2 is closer to 0 than to 100.

ROUND(-1.963,0) //-2

 
PROPERTIES 

Product: 4D
Theme: 4D View Pro Formulas

 
PAGE CONTENTS 
 
HISTORY 

 
ARTICLE USAGE

4D View Pro Reference ( 4D v19)