syntax:functions:roundxl
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
syntax:functions:roundxl [2021/07/31 21:40] – craigt | syntax:functions:roundxl [2021/09/30 13:10] – dmitry | ||
---|---|---|---|
Line 7: | Line 7: | ||
Excel rounding logic rounds a decimal value of 5 or greater //up// to the next nearest value (towards positive infinity) and 4 or less //down// to the next nearest value (towards negative infinity). | Excel rounding logic rounds a decimal value of 5 or greater //up// to the next nearest value (towards positive infinity) and 4 or less //down// to the next nearest value (towards negative infinity). | ||
+ | |||
+ | \\ | ||
+ | |||
+ | =====Alternative syntax===== | ||
+ | The 2nd argument in this function is optional. If omitted, it's assumed to be 0. | ||
+ | RoundXL(number) | ||
\\ | \\ | ||
Line 12: | Line 18: | ||
^Argument^Type^Description^ | ^Argument^Type^Description^ | ||
|number|Number|The value, usually fractional, to be rounded.| | |number|Number|The value, usually fractional, to be rounded.| | ||
- | |dec_places|Number (positive, >=0)|The number of decimal places to round //number// to.| | + | |dec_places|Number (from -9 to 28)|The number of decimal places to round //number// to.| |
\\ | \\ | ||
**Return value type: | **Return value type: | ||
Line 18: | Line 24: | ||
\\ | \\ | ||
=====Remarks===== | =====Remarks===== | ||
- | There exists | + | There exist two types of rounding, in general - " |
Using a // | Using a // | ||
Line 25: | Line 31: | ||
=====Examples===== | =====Examples===== | ||
- | roundxl(5.55, | + | roundxl(5.55, |
- | roundxl(5.65, | + | |
- | roundxl(10.434, | + | roundxl(5.65, |
- | roundxl(20.5456, | + | |
+ | roundxl(10.434, | ||
+ | |||
+ | roundxl(20.5456, | ||
+ | roundxl(12345, | ||
\\ | \\ | ||
Line 35: | Line 45: | ||
* [[syntax: | * [[syntax: | ||
* [[syntax: | * [[syntax: | ||
+ | * [[syntax: | ||
* [[syntax: | * [[syntax: | ||
* [[syntax: | * [[syntax: |
syntax/functions/roundxl.txt · Last modified: 2023/02/28 20:14 by craigt