For basic Excel functions, the TRUNC function is a simple function that removes decimal places. Just apply the TRUNC function correctly, and youll get a quick and accurate result without needing many steps.
To learn more about what the TRUNC function in Excel is and how to use it, please continue reading the article below from TipsMake.
The concept and usage of the TRUNC function in Excel.
1. What is the TRUNC function?
The TRUNC function in Excel is used to remove decimal places. The difference between the TRUNC function and other Excel functions is that it doesn't round values. For example, let's say we have a value of 4.68. To remove the decimal places, we use the TRUNC function, and the result will be 4.
The TRUNC function structure is: =TRUNC(number, [digits])
In this function:
- Parameter: number is the value from which you want to remove decimal places.
- Parameter: digits are the decimal places you want to remove. This parameter is optional; if not specified, the TRUNC function will remove all decimal places.
2. How to use the TRUNC function in Excel
Use the TRUNC function to truncate the decimal part of the number.
To help you understand how to use the TRUNC function in Excel, let's look at some examples below:
Example 1:
=TRUNC(A2)
By default, if no decimal places are specified, all decimal values will be removed.
In the example above, the value in cell A2 is not rounded; we didn't specify how many digits to truncate. By default, the TRUNC function truncates all decimal places, so the result returned is 411.
Example 2:
In the example below, we will specify the TRUNC function to truncate 2 decimal places: =TRUNC(A2,2)
The TRUNC function does not truncate decimal places if we specify more decimal places than the original value.
For example, consider the following: =TRUNC(A2,2)
The value in cell A4 has 2 decimal places truncated, however, the values in cells A2 and A3 remain unchanged because the decimal places are 2 digits fewer.
Use the TRUNC function to remove the time from the date and time fields.
Additionally, we can use the TRUNC function to remove the time from the date and time column in Excel.
The example below illustrates how to use the TRUNC function to remove the time from the date and time column. We will use the following formula:
=TRUNC(A2)
The results will be in the following format:
Use the TRUNC function to shorten the number.
You may not know that the TRUNC function also accepts negative numbers for its digit parameters. If the parameter is a negative number, the function will truncate the digits to the left of the decimal point. The deleted digits will be replaced with zeros.
See the example below for more information: =TRUNC(A2,-1)
As you can see in the example above, the number removed to the left of the decimal point is replaced with a zero.
The article above from TipsMake has introduced you to what the TRUNC function in Excel is and how to use it. Additionally, readers can refer to other articles on TipsMake to learn more about other Excel calculation functions and examples.