Microsoft Office Tutorials and References
In Depth Information
Leaving Some Decimals Behind with TRUNC
INT(25.25) returns 25.
INT(25.75) returns 25.
INT(-25.25) returns –26.
INT(-25.75) returns –26.
Here’s how to use the INT function:
1. In a cell of your choice, enter a number that has a decimal portion.
2. Position the cursor in the cell where you want the results to appear.
3. Enter =INT( to begin the function entry.
4. Click the cell where you entered the number.
5. Enter a closing parenthesis to end the function, and press the Enter key.
INT can also be used to return just the decimal part of a number. Subtracting
the integer portion of a number from its full value leaves just the decimal as
the answer. For example, 10.95-INT(10.95) equals 0.95.
Leaving Some Decimals
Behind with TRUNC
The TRUNC function drops a part of a number. The function takes two
arguments. The first argument is the number to be changed. The second
argument indicates how much of the number is to be dropped. A value of 2 for the
second argument says to leave 2 decimal places remaining. A value of 1 for
the second argument says to leave 1 decimal place remaining.
TRUNC does no rounding as it truncates numbers. Here are some examples:
=TRUNC(212.65, 2) returns 212.65.
=TRUNC(212.65, 1) returns 212.6.
=TRUNC(212.65, 0) returns 212.
You can even use TRUNC to drop a portion of the number from the integer
side. To do this, you enter negative values for the second argument, like this:
=TRUNC(212.65, -1) returns 210.
=TRUNC(212.65, -2) returns 200.
Search JabSto ::

Custom Search