Syntax
=TRUNC(number, [num_digits])Arguments
| Argument | Required | Description |
|---|---|---|
number | Required | The number to truncate |
num_digits | Optional | Digits to keep after the decimal point (0 when left out) |
How to use TRUNC
TRUNC takes 1 required argument and 1 optional argument. Type =TRUNC( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=TRUNC(8.9)Result =TRUNC(-8.9)Result =TRUNC(0.45, 1)Result Related math functions
- SUMPRODUCTMultiplies matching items of arrays or ranges and returns the sum of those products.
- SUMSQReturns the sum of the squares of the numbers.
- SUMX2MY2Returns the sum of the differences of the squares of matching values in two arrays.
- SUMX2PY2Returns the sum of the sums of the squares of matching values in two arrays.
- SUMXMY2Returns the sum of the squares of the differences of matching values in two arrays.
- TANReturns the tangent of an angle given in radians.
- TANHReturns the hyperbolic tangent of a number.
- UMINUSReturns a number with its sign reversed.
- UNARY_PERCENTReturns a number divided by 100, like the % operator.