How to Truncate Decimal Places in Excel Functions

1. Introduction

When working with numbers in Excel, it’s often necessary to round off decimal places. Excel provides various rounding functions to accommodate this need. In this article, we will delve into these rounding functions and understand how they can be used effectively.

2. Rounding Functions in Excel

In Excel, there are various functions that can be used to round numbers to a specific decimal place or to the nearest integer. These functions include ROUNDUP, ROUNDDOWN, MROUND, CEILING, FLOOR, TRUNC, and INT. Each function serves a different rounding purpose and can be utilized based on specific requirements. Let’s explore these functions in detail.

3. ROUNDUP Function

The ROUNDUP function in Excel is used to round a number up to a specific decimal place. It takes two arguments: the number to be rounded and the number of decimal places to round up to. The syntax for the ROUNDUP function is:

=ROUNDUP(number, num_digits)

For example, if we want to round the number 7.89 up to two decimal places, we can use the ROUNDUP function as follows:

=ROUNDUP(7.89, 2) // Result: 7.89

The function rounds the number up to the nearest 0.01, resulting in 7.89.

4. ROUNDDOWN Function

The ROUNDDOWN function in Excel is used to round a number down to a specific decimal place. It also takes two arguments: the number to be rounded and the number of decimal places to round down to. The syntax for the ROUNDDOWN function is:

=ROUNDDOWN(number, num_digits)

For example, if we want to round the number 7.89 down to one decimal place, we can use the ROUNDDOWN function as follows:

=ROUNDDOWN(7.89, 1) // Result: 7.8

The function rounds the number down to the nearest 0.1, resulting in 7.8.

5. MROUND Function

The MROUND function in Excel is used to round a number to the nearest specified multiple. It takes two arguments: the number to be rounded and the multiple to which it should be rounded. The syntax for the MROUND function is:

=MROUND(number, multiple)

For example, if we want to round the number 7.89 to the nearest multiple of 0.5, we can use the MROUND function as follows:

=MROUND(7.89, 0.5) // Result: 7.5

The function rounds 7.89 to the nearest multiple of 0.5, resulting in 7.5.

6. CEILING Function

The CEILING function in Excel is used to round a number up to the nearest specified multiple. It takes two arguments: the number to be rounded and the multiple to which it should be rounded up. The syntax for the CEILING function is:

=CEILING(number, significance)

For example, if we want to round the number 7.89 up to the nearest multiple of 1, we can use the CEILING function as follows:

=CEILING(7.89, 1) // Result: 8

The function rounds 7.89 up to the nearest multiple of 1, resulting in 8.

7. FLOOR Function

The FLOOR function in Excel is used to round a number down to the nearest specified multiple. It takes two arguments: the number to be rounded and the multiple to which it should be rounded down. The syntax for the FLOOR function is:

=FLOOR(number, significance)

For example, if we want to round the number 7.89 down to the nearest multiple of 2, we can use the FLOOR function as follows:

=FLOOR(7.89, 2) // Result: 6

The function rounds 7.89 down to the nearest multiple of 2, resulting in 6.

8. TRUNC Function

The TRUNC function in Excel is used to remove the decimal portion of a number and return the integer portion. It takes two arguments: the number to be truncated and the number of decimal places to keep. The syntax for the TRUNC function is:

=TRUNC(number, [num_digits])

If the num_digits argument is not provided, the function removes all decimal places and returns the integer part of the number. For example:

=TRUNC(7.89) // Result: 7

The function removes the decimal portion of 7.89 and returns 7.

If the num_digits argument is provided, the function keeps the specified number of decimal places. For example:

=TRUNC(7.89, 1) // Result: 7.8

The function keeps 1 decimal place in 7.89 and returns 7.8.

9. INT Function

The INT function in Excel is used to return the integer part of a number by truncating the decimal portion. It takes one argument: the number for which the integer part needs to be returned. The syntax for the INT function is:

=INT(number)

The function removes the decimal portion of a number and returns the integer part. For example:

=INT(7.89) // Result: 7

The function removes the decimal portion of 7.89 and returns 7.

Note that the INT function truncates the decimal part towards zero. It does not round the number. For negative numbers, the INT function rounds towards negative infinity. For example:

=INT(-7.89) // Result: -8

The function rounds -7.89 towards negative infinity and returns -8.

10. Conclusion

In this article, we discussed two important functions in Excel for removing decimal places: TRUNC and INT. The TRUNC function allows you to remove the decimal portion of a number and keep the integer part, either by removing all decimal places or by specifying the number of decimal places to keep. On the other hand, the INT function returns the integer part of a number by truncating the decimal portion. Keep in mind that the INT function truncates towards zero and does not round the number. Both functions are useful for various calculations and formatting purposes in Excel.

By understanding how to use these functions, you can manipulate and modify decimal numbers as per your requirements in Excel. Practice using these functions in your spreadsheets to perform accurate calculations and present your data effectively.

%d 블로거가 이것을 좋아합니다: