Excel TRUNC function
The TRUNC function in Excel helps to get a truncated number based on a specific number of digits, it is used to reduce or eliminate the decimal portion of a number instead of rounding the number.
- Example 1: Trunc function to remove specific number of decimal digits from numbers
- Example 2: Trunc function to remove time from list of datetime cells
The syntax for the TRUNC function in Excel is:
Return a truncated number based on a given precision.
Supposing, you want to truncate the numbers based on a specific number of decimal digits, please apply the below formula:
And then, drag the fill handle down to the cells you want to apply this formula, you will get the result as following screenshot shown:
This TRUNC function also can help to remove time from date time format, please use this formula:
And then, drag the fill handle down to the cells to apply this formula, see screenshot:
At last, you should format the calculated cells as Date format as below screenshot shown:
More articles with TRUNC function:
- Remove Digits After Decimal In Excel
- Sometimes you need to remove all digits after decimal to make numbers to whole numbers. You may think the Decrease Decimal feature can deal with it. Actually, the Decrease Decimal feature just changes a number’s display value, for example, show 2.5 as 3, but the actual value still is 2.5 showing in the formula bar. Therefore, how to remove digits after decimal in Excel?
- Extract Decimal Value From String In Excel
- This tutorial will tell you how to extract decimal value only from a string in Excel.