Truncates a number by removing decimal places.
Returns Number with at most Count decimal places. Excess decimal places are simply removed, irrespective of sign.
Number is a real number or a reference to the cell containing that number which you want to truncate.
Count(Optional) is an integer specifying the precision of the truncation. The default value for Count is 0 hence function returns the integer part of the Number.
If Count is non-integer value then the function takes the floor of it, i.e. truncates it to integer.
TRUNC(Number; 0) behaves as INT(Number) for positive numbers, but effectively rounds towards zero for negative numbers.
|=TRUNC(1.239;2)||truncates 1.239 to 2 decimal places||1.23|
|=TRUNC(-1.234999;3)||truncates -1.234999 to 3 decimal places||-1.234|
Related LibreOffice functions:
Equivalent Excel functions: