What is the TRUNC function in Excel? How to use the TRUNC function to round numbers to integer in a super easy way

In this article, we will delve into the details of the TRUNC function in Excel, an important tool in dealing with numerical data. We will explore how this function removes the decimal part, retains the integer part, and how it can be seamlessly integrated into the spreadsheet workflow.

0
185

In the complex world of digital data and spreadsheets, this function is not only a simple tool to remove decimals, but also provides flexible solutions for many data processing situations. Let’s find out more about what the TRUNC function is and how it works to enhance the accuracy of your spreadsheet.

1. Understanding the TRUNC function

1.1. What is the TRUNC function?

The TRUNC function in Excel is used to truncate a number by removing the decimal part and retaining only the integer part. Specifically, this function returns an integer by discarding all decimal digits of a given number, rounding it towards zero.

The syntax of the TRUNC function is as follows:

TRUNC(number, [num_digits])

Where:

  • number: The number you want to truncate the decimal part of.
  • num_digits: (Optional) The number of decimal places you want to preserve. The default value is 0.

A decimal number consists of two main components: Integer part and decimal part, separated by a decimal point. The integer part includes positive integers, negative integers, and zero, and is located before the decimal point. On the other hand, the decimal part is a collection of natural numbers that appear after the decimal point.

Example: =TRUNC(123.456, 2)

The function will return the value 123.45, which means the decimal part has been removed and 2 significant digits have been retained.

Note:

  • If the number is not a numeric type, the TRUNC function will return an error value #VALUE!
  • The function does not take into account the sign of the number argument and the value is only truncated when it contains decimal digits.
  • If the number is an integer, the TRUNC function will not perform rounding.

1.2. Applications of the TRUNC function in Excel

The TRUNC function can be used in various scenarios, including:

  • Removing the decimal part of a number: For example, you can use the TRUNC function to convert a currency value into an integer.
  • Rounding a number to a certain number of significant digits: For example, you can use the TRUNC function to round a student’s score.
  • Comparing numbers with the same number of significant digits: For example, you can use the TRUNC function to compare the revenue of companies in an industry.

Note:

  • Both the TRUNC and INT functions return integer values.
  • The TRUNC function removes the decimal part of a number. For example, when applying the TRUNC function to -6.2, the result is -6.
  • The INT function rounds down to the nearest integer based on the decimal value of the number. For example, when using the INT function on -6.2, the result is -7 because -7 is smaller.

2. How to use the TRUNC function in Excel

To illustrate the application of the TRUNC function in Excel, let’s create a sample table with different scenarios. Here is a simple Excel table:

Index Decimal Number TRUNC Function Description
1 15.79 =TRUNC(B2) Removes decimal part, result: 15
2 23.56 =TRUNC(B3) Removes decimal part, result: 23
3 -6.2 =TRUNC(B4) Removes decimal part, result: -6
4 37.864 =TRUNC(B5, 2) Preserves 2 decimal places, result: 37.86

In the table above:

  • The Decimal Number column contains different decimal values.
  • The TRUNC Function column contains formulas applying the TRUNC function to demonstrate how it works.
  • The Description column provides a brief explanation of the result of the TRUNC function in each case.

This table helps you see how the TRUNC function removes the decimal part of a number and can be used to meet various requirements in the process of numerical data processing in Excel.

3. Conclusion

In conclusion, the TRUNC function in Excel is a powerful tool to remove the decimal part of a number and retain only the integer part. Though simple, this function brings significant benefits in numerical data processing, enhancing flexibility and accuracy in calculations. Understanding how to use and apply the TRUNC function can help Excel users optimize their work in dealing with numbers and spreadsheets.

This article has provided you with a better understanding of what the TRUNC function is in Excel and how to use the TRUNC function effectively and efficiently. If you find it helpful, you can share this article with your friends and family. Wish you success in implementing it!

Are you in need of a laptop for work, study, or entertainment? Do you want an efficient laptop that saves costs? Then come to FPT Shop! FPT Shop is the leading reputable laptop retailer in Vietnam, offering a variety of models, configurations to meet all user needs.

Great laptops at good prices

You may also like

What are Excel formulas? Learn how to write and use Excel formulas effectively

Join FPT Shop to explore what Excel’s difference symbol is, how to write it, and how to use the difference symbol in Excel to compare data quickly and easily.

Learn the functions and usage of the MID function in Excel with the most detailed examples

Excel’s MID function is incredibly easy to use, and if you know how to use it correctly, it can save you a lot of time in your work and studies. To help you better understand the MID function, FPT Shop will explain its usage along with detailed examples in the following article.

15 Must-Know Excel Tricks for Accountants and Office Professionals

Excel is a widely used software tool among office workers. However, not everyone knows how to maximize their productivity while minimizing their working time. In this article, FPT Shop will reveal some incredibly useful Excel tricks to help you achieve that.

An Easy Guide to Separating Thousands in Word and Some Tips to Keep in Mind

Number formatting in Word makes data easier to read and understand, especially when working with large numbers. Additionally, number formatting also adds a professional touch to your text. Let’s explore two ways to format numbers in Word right away!