How to use the TRUNC function in Microsoft Excel

how to use the trunc function in microsoft excel - How to use the TRUNC function in Microsoft Excel

We all have executed some primary maths the place we used to shorten a quantity with a whole lot of decimal digit. If Truncate and Round of sounds acquainted, then you definately bought it proper. In this submit, we’ll present how one can use the TRUNC function in Microsoft Excel.

Before we go forward, let’s brush on the basic distinction between Trunc and Round. If you may have a decimal variety of 5.678, then utilizing Trunc will end result in 5.67. Compared to this Round function will end result in 5.68. Notice the distinction? The Round function will select the subsequent highest quantity, whereas Trunc will do the actual reverse.

The TRUNC Function

The Trunc function like , which takes parameters. One of the parameters is the quantity which wants to be truncated, whereas the second is to the variety of decimal locations.  In easy phrases, the TRUNC function truncates a quantity to a specified variety of decimal locations.

The syntax for Trunc function: 

TRUNC(quantity, [num_digits])

Digits, the second parameter is non-compulsory, and the default worth is zero. It means if you don’t cross or specify a worth, it’s going to take away all digits, and cut back the quantity to the closest decrease quantity.

Remember, the end result will likely be the reverse in the case of unfavourable numbers.

How to use TRUNC function in Excel

The finest approach to perceive how one can use the TRUNC function in Excel is by instance. About making use of it, it’s tad easy.

  • In the Excel file, select the place you need the truncated quantity to seem.
  • Double click on on the cell to edit, the worth, after which sort = Trunc(C4, 2). C4 is a cell on excel which carries a numerical.
  • As quickly as you sort Trunc, it is possible for you to to select any cell on the excel. Close the bracket, and hit the Enter key
  • If there aren’t any errors, it’s best to see the truncated worth.

Digits matter

You can’t apply the identical digits parameter to all decimals when utilizing the Trunc function. If there’s a quantity that has just one digit place after the decimal, and also you use quantity three as a digit parameter, then it is not going to have an effect on. In the above instance, 51.four stays the identical as we selected the next digit parameter whereas there is just one digit after the decimal. Similarly, even in the event you enhance the worth of the digit, it is not going to present extra.

Related:

Where are you able to use the Trunc Function?

There are a few locations you’ll be able to use this function.

  • DateTime Stamp: When you may have each dates, and time in a cell, you’ll be able to use Trunc to take away time and extract the information.
  • Removing Decimal: If you simply need complete numbers and never the decimal, Trunc with out Digits parameter.
  • Passing a unfavourable quantity as the digits parameter will truncate the quantity earlier than the decimal. 28.99 will truncate to 20.
  • It additionally means you’ll be able to Trunc complete numbers to their lowest kind. Twenty-nine will truncate to twenty.

Unlike college maths, Roundoff doesn’t carry out each capabilities. The Round function does exactly the reverse of the Trunc.

Leave a Comment