We all have done some basic maths where we used to shorten a number with a lot of decimal digit. If Truncate and Round of sounds familiar, then you got it right. In this post, we will show how you can use the TRUNC function in Microsoft Excel.
Before we go ahead, let’s brush on the fundamental difference between Trunc and Round. If you have a decimal number of 5.678, then using Trunc will result in 5.67. Compared to this Round function will result in 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 parameters. One of the parameters is the number which needs to be truncated, while the second is to the number of decimal places. In simple words, the TRUNC function truncates a number to a specified number of decimal places.
The syntax for Trunc function:
Digits, the second parameter is optional, and the default value is 0. It means if you do not pass or specify a value, it will remove all digits, and reduce the number to the closest lower number.
Remember, the result will be the opposite in the case of negative numbers.
How to use TRUNC function in Excel
The best way to understand how you can use the TRUNC function in Excel is by example. About applying it, it is tad simple.
- In the Excel file, choose where you want the truncated number to appear.
- Double click on the cell to edit, the value, and then type = Trunc(C4, 2). C4 is a cell on excel which carries a numerical.
- As soon as you type Trunc, you will be able to choose any cell on the excel. Close the bracket, and hit the Enter key
- If there are no errors, you should see the truncated value.
You cannot apply the same digits parameter to all decimals when using the Trunc function. If there is a number that has only one digit place after the decimal, and you use number 3 as a digit parameter, then it will not affect. In the above example, 51.4 remains the same as we chose a higher digit parameter while there is only one digit after the decimal. Similarly, even if you increase the value of the digit, it will not show more.
Related: Office Excel Tips and Tricks
Where can you use the Trunc Function?
There are a couple of places you can use this function.
- DateTime Stamp: When you have both dates, and time in a cell, you can use Trunc to remove time and extract the data.
- Removing Decimal: If you just want whole numbers and not the decimal, Trunc without Digits parameter.
- Passing a negative number as the digits parameter will truncate the number before the decimal. 28.99 will truncate to 20.
- It also means you can Trunc whole numbers to their lowest form. Twenty-nine will truncate to twenty.
Unlike school maths, Roundoff doesn’t perform both functions. The Round function does precisely the opposite of the Trunc.
Read next: How to use Excel to design simple Floor Plans.
- Tags: Excel