5 Ways To Remove Decimal From Number In Excel

Remove decimal points from numbers in Excel with ease! Discover 5 simple methods to truncate decimal values, including formatting changes, formulas, and VBA macros. Master how to delete decimal places, round numbers, and convert decimal to integer in Excel. Learn the most efficient techniques to tidy up your data and enhance your spreadsheet skills.

cloudiway

5 Ways To Remove Decimal From Number In Excel
5 Ways To Remove Decimal From Number In Excel

Numbers with decimals can be a challenge to work with in Excel, especially when you need to remove them. Whether you're dealing with financial data, scientific calculations, or everyday arithmetic, knowing how to eliminate decimals from numbers in Excel is a valuable skill. In this article, we'll explore five different methods to remove decimals from numbers in Excel, catering to various situations and user needs.

The Importance of Removing Decimals in Excel

Before we dive into the methods, it's essential to understand why removing decimals is crucial in certain contexts. For instance:

  • When dealing with monetary values, you might want to display only the whole number amount.
  • In scientific calculations, decimals can sometimes be unnecessary or even misleading.
  • When formatting data for reporting or presentation purposes, decimals might need to be removed for clarity or aesthetics.

Method 1: Using the TRUNC Function

The TRUNC function is a straightforward way to remove decimals from numbers in Excel. This function truncates a number to a specified number of digits, effectively removing any decimals.

Excel TRUNC Function

Syntax: TRUNC(number, [num_digits])

  • number is the value you want to truncate.
  • [num_digits] is an optional argument specifying the number of digits to keep. If omitted, the function will truncate to the nearest integer.

Example:

Number Formula Result
123.45 =TRUNC(A1) 123
123.45 =TRUNC(A1, 1) 123.4

Method 2: Using the INT Function

The INT function is another way to remove decimals from numbers in Excel. This function returns the integer part of a number, effectively discarding any decimal values.

Excel INT Function

Syntax: INT(number)

  • number is the value you want to convert to an integer.

Example:

Number Formula Result
123.45 =INT(A1) 123

Method 3: Using the ROUND Function

The ROUND function can also be used to remove decimals from numbers in Excel, albeit with a slightly different approach. By rounding a number to a specified number of digits, you can effectively eliminate decimals.

Excel ROUND Function

Syntax: ROUND(number, [num_digits])

  • number is the value you want to round.
  • [num_digits] is an optional argument specifying the number of digits to keep. If omitted, the function will round to the nearest integer.

Example:

Number Formula Result
123.45 =ROUND(A1, 0) 123
123.45 =ROUND(A1, 1) 123.5

Method 4: Using Number Formatting

Another approach to removing decimals from numbers in Excel is to use number formatting. By applying a custom number format, you can display numbers without decimals.

Excel Number Formatting
  1. Select the cells containing the numbers you want to format.
  2. Go to the Home tab in the Excel ribbon.
  3. Click on the Number Format button in the Number group.
  4. Select Custom from the drop-down menu.
  5. In the Format Cells dialog box, enter 0 (without the quotes) in the Type field.
  6. Click OK to apply the format.

Method 5: Using VBA Macro

If you need to remove decimals from a large dataset or perform this task frequently, you can create a VBA macro to automate the process.

Excel VBA Macro
  1. Press Alt + F11 to open the Visual Basic Editor.
  2. In the Editor, go to Insert > Module to create a new module.
  3. Paste the following code:
Sub RemoveDecimals()
    Selection.Value = VBA.Int(Selection.Value)
End Sub
  1. Save the module by clicking File > Save (or press Ctrl + S).
  2. To run the macro, select the cells containing the numbers you want to modify and press Alt + F8. Then, select the RemoveDecimals macro and click Run.

Gallery of Excel Functions:

FAQs:

What is the difference between the TRUNC and INT functions in Excel?

+

The TRUNC function truncates a number to a specified number of digits, while the INT function returns the integer part of a number, effectively discarding any decimal values.

How do I remove decimals from a large dataset in Excel?

+

You can use the TRUNC or INT functions, or create a VBA macro to automate the process.

Can I use number formatting to remove decimals from numbers in Excel?

+

Yes, you can apply a custom number format to display numbers without decimals.

By mastering these five methods, you'll be able to remove decimals from numbers in Excel with ease, making your data analysis and presentation tasks more efficient and effective.

Gallery of 5 Ways To Remove Decimal From Number In Excel

Also Read

Share: