We have all done some basic calculations where we shorten a number with lots of decimals. Yes Truncate and Round familiar sounds, then you get it right. In this article, we will show how you can use the TRUNC function in Microsoft Excel.
Before continuing, let’s look at the fundamental difference between Trunc and Round. If you have a decimal number of 5.678, using Trunc will result in 5.67. Compared to this Round function, this will give 5.68. Notice the difference? The Round function will choose the next highest number, while Trunc will do the exact opposite.
The TRUNC function
The Trunc function like any other function or formula in Excel, which takes settings. One of the parameters is number which must be truncated, while the second is at the number of decimal places. Simply put, the TRUNC function truncates a number to a specified number of decimal places.
The Trunc function syntax:
TRUNC(number, [num_digits])
Digits, the second parameter is optional and the default value is 0. This means that if you do not pass or specify a value, it will delete all the digits and reduce the number to the nearest lower number.
Remember that the result will be reversed in the case of negative numbers.
How to use TRUNC function in Excel
The best way to understand how to use the TRUNC function in Excel is for example. To apply it, it’s a bit simple.
- In the Excel file, choose where you want the truncated number to appear.
- Double-click the cell to modify, the value, then type = Trunc (C4, 2). C4 is a cell on excel which carries a numeric.
- As soon as you type Trunc, you will be able to choose any cell in Excel. Close the holder and press the Enter key
- If there are no errors, you should see the truncated value.
The numbers count
You cannot apply the same digit setting to all decimals when using the Trunc function. If there is a number that has only one digit after the decimal and you use the digit 3 as a numeric parameter, this will not affect. In the example above, 51.4 remains the same as we chose a higher digit setting when there is only one digit after the decimal. Similarly, even if you increase the value of the digit, it will no longer be displayed.
Related: Office Excel Tips and Tricks
Where can you use the Trunc function?
There are a few places where you can use this function.
- DateTime Buffer: When you have both date and time in a cell, you can use Trunc to delete the time and extract the data.
- Suppression of the decimal: if you just want whole numbers and not the decimal, parameter Trunc without figures.
- Passing a negative number as a digit parameter will truncate the number before the decimal. 28.99 will be truncated to 20.
- It also means that you can Trunc whole numbers at their lowest form. Twenty-nine will truncate to twenty.
Unlike school mathematics, Roundoff does not fulfill both functions. The Round function does the exact opposite of Trunc.