spot_img

Chop off Decimals

 

Int | Trunc | Decimal Part

This example illustrates two functions to chop off decimals in Excel. INT and TRUNC.

Int

The INT (Integer) function rounds a number down to the nearest integer (negative numbers become more negative).

Int Function in Excel, Positive Number

Int Function, Negative Number

Conclusion: the INT function only chops off decimals from positive numbers.

Trunc

The TRUNC (Truncate) function always chops off decimals.

Trunc Function, Positive Number

Trunc Function, Negative Number

The TRUNC function can keep any number of decimals. Simply use the second argument to specify how many decimals you want to keep.

Keep Two Decimals

Keep Three Decimals

Decimal Part

To return just the decimal part of a number, use the following formula.

Decimal Part

Note: if the second argument of the TRUNC function is omitted, a value of 0 is assumed.

spot_img
Previous articleCalculated Field/Item in a Pivot Table – Easy Excel
Next articleCount Cells with Text in Excel