The Excel Trunc function truncates a supplied number to a specified number of decimal places.
The syntax of the function is:
Where the arguments are as follows:
number | - | The number that is to be truncated. |
[num_digits] | - |
An optional argument that specifies the number of decimal places to truncate the supplied number to. If omitted, the [num_digits] argument uses the default value 0. Note that:
|
The following spreadsheet shows several examples of the Excel Trunc function:
Formulas:
|
Results:
|
The example in cell B3 of the above spreadsheet shows that, when the [num_digits] argument is omitted, it takes the default of 0. I.e. the supplied number is truncated to an integer.
If you require different rounding rules, check out our comparison of Excel Rounding Functions.
For further information on the Excel Trunc Function, see the Microsoft Office website.