How to use the TRUNC function in Excel?

There are various ways in Excel to remove decimal and shorten numeric values. In this article, TipsMake.com will explain how to use the TRUNC function and show what makes it different from other techniques.

There are various ways in Excel to remove decimal and shorten numeric values. In this article, TipsMake.com will explain how to use the TRUNC function and show what makes it different from other techniques.

How to use the TRUNC function?

See examples of the TRUNC function with some sample data. The following example uses the following TRUNC function.

 =TRUNC(A2) 

If you do not specify how many digits are to be truncated, all decimal places will be removed.

Picture 1 of How to use the TRUNC function in Excel?
If you do not specify how many digits are to be truncated, all decimal places will be removed

You can see with the value in cell A2 that the TRUNC function does not apply any rounding. It simply cuts to 411.

Let us see another example. This time the example will reduce the values ​​to two decimal places.

 =TRUNC(A2,2) 
Picture 2 of How to use the TRUNC function in Excel?
Reduce the values ​​to two decimal places

The TRUNC function will not display more decimal numbers if you request it to display more numbers than you have.

Take the following example and cut it down to 2 decimal places.

 =TRUNC(A2,2) 
Picture 3 of How to use the TRUNC function in Excel?
The value in cell A4 is reduced to 2 decimal places

The value in cell A4 is reduced to 2 decimal places, but the values ​​in A2 and A3 remain the same because they have fewer than two decimal places.

If you want to display two decimal numbers, the cells will need to be formatted to force them to be displayed.

Clear part of the day and time stamp

A useful example of TRUNC is to remove the time part from the date and the timestamp in Excel.

Imagine you have the following dates and timestamps, but you just want to have the date part in the column for analysis.

Picture 4 of How to use the TRUNC function in Excel?
Remove time part from date and time stamp in Excel

The following formula will remove the time portion.

 =TRUNC(A2) 
Picture 5 of How to use the TRUNC function in Excel?
The time part has been removed

Although the time section has been removed, the resulting cells will still need to be formatted as dates.

Use TRUNC to shorten numbers

This is a rare technique. When you use negative numbers, the function cuts the numbers to the left of the decimal point. However, it does not change the number of digits, but replaces them with zeroes.

Take a look at the following example.

 =TRUNC(A2,-1) 
Picture 6 of How to use the TRUNC function in Excel?
Use TRUNC to shorten numbers

You can see in each example that the number 0 is used to replace the number removed to the left of the decimal point.

There are many ways in Excel to delete decimal places, however, most of them will round numbers. The strength of the TRUNC function is that it does not round values ​​and simply shortens them to the specified number of decimal places.

Update 13 March 2020
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile