En Excel, es común que necesitemos convertir números decimales a enteros para diversos fines. Esta operación es bastante sencilla de realizar y puede ser de gran utilidad en distintos contextos. A continuación, te explicaremos cómo llevar a cabo esta conversión en Excel en inglés.
Using the INT function
The INT function in Excel is used to convert a decimal number to an integer by rounding down to the nearest whole number. The syntax for the INT function is:
=INT(number)
Where “number” is the decimal number that you want to convert to an integer. For example, if you have the decimal number 5.7 in cell A1, you can use the INT function in cell B1 to convert it to an integer:
=INT(A1)
Using the TRUNC function
Another way to convert a decimal number to an integer in Excel is by using the TRUNC function. The TRUNC function truncates a number to a specified number of decimal places, effectively removing the decimal part. The syntax for the TRUNC function is:
=TRUNC(number, [num_digits])
Where “number” is the decimal number that you want to convert to an integer, and “num_digits” is the number of decimal places to keep. If you want to convert the decimal number 7.8 in cell A1 to an integer, you can use the TRUNC function in cell B1 with 0 decimal places:
=TRUNC(A1, 0)
Using the ROUND function
The ROUND function in Excel can also be used to convert a decimal number to an integer by rounding to the nearest whole number. The syntax for the ROUND function is:
=ROUND(number, 0)
Where “number” is the decimal number that you want to convert to an integer, and 0 specifies that you want to round to 0 decimal places. For example, if you have the decimal number 9.4 in cell A1, you can use the ROUND function in cell B1 to convert it to an integer:
=ROUND(A1, 0)
Conclusion
Converting decimal numbers to integers in Excel is a simple task that can be done using various functions such as INT, TRUNC, and ROUND. Depending on your specific needs, you can choose the most appropriate function to achieve the desired result. By mastering these techniques, you will be able to work more efficiently with decimal and integer numbers in Excel.