Microsoft KB Archive/91076

= Works: Using INT to Find Integer and Real Parts of Numbers =

Article ID: 91076

Article Last Modified on 1/18/2007

-

APPLIES TO


 * Microsoft Works 2.0 Standard Edition
 * Microsoft Works 2.0a
 * Microsoft Works 3.0 Standard Edition
 * Microsoft Works 4.5 Standard Edition
 * Microsoft Works 4.5a
 * Microsoft Works 4.0 Standard Edition
 * Microsoft Works 4.0a
 * Microsoft Money 2000 Business & Personal Edition

-



This article was previously published under Q91076



SUMMARY
In the examples below, X and N are numbers or a reference to a cell containing a number. This article describes how to use the INT function to return the following values:


 * Integer Portion of a Number


 * Fractional (Real) Portion of a Number


 * Truncate to a certain number of decimal places



MORE INFORMATION
The following are several ways you can apply the INT function to extract portions of a number:

To find the integer portion of a number, X:

=INT(X)

For example, =INT(13.35) returns 13.

To find the fraction portion of X to N decimal places:

=INT(X*10^N)/10^N-INT(X)

For example, if N is 3, 10^N is 1000.

For example, X=13.35 and N=3, the formula returns 0.35.

To truncate X beyond the Nth decimal place:

=INT(X*10^N)/10^N

For example X=13.35342 and N=2, the function returns 13.35

To truncate the integer portion of X by N digits:

=INT(X/10^N)*10^N

For example, X=13542.243 and N=2, the function returns 13500.

NOTE: Fractional portions of the results will appear rounded if the column is not wide enough to display all the digits.

Additional query words: w_works 2.00 2.00a 3.00 4.00 4.00a 4.50 4.50a uses int function fp ip fraction part integer

Keywords: kbinfo KB91076

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.