Works: How to Truncate Numbers in Works Without Rounding (124423)
The information in this article applies to:
- Microsoft Works 2.0
- Microsoft Works 2.0a
- Microsoft Works 3.0
- Microsoft Works 3.0a
- Microsoft Works 3.0b
- Microsoft Works 4.5
- Microsoft Works 4.5a
- Microsoft Works for Windows 95, version 4.0
- Microsoft Works for Windows 95, version 4.0 4.0a
This article was previously published under Q124423 SUMMARY
To truncate numbers without rounding in a Works for Windows spreadsheet or
database, use one of the following formulas
Spreadsheet: =INT(<Value or Cell Reference> * 10^<Digits>)/10^<Digits>
Database: =INT(<Fieldname> * 10^<Digits>)/10^<Digits>
where <Value>, <Cell Reference>, or <Fieldname> is the number to be truncated. <Digits> is the desired number of places to the right of the decimal point.
NOTE: The caret ^ ( SHIFT+6) is the exponential operator.
EXAMPLE
To truncate the number 12.34567 to two digits in a spreadsheet, do the
following.
- Create a new Spreadsheet.
- In cell A1, enter the number 12.34567.
- In cell B1, enter the formula
=INT(A1*10^2)/10^2.
The value in B1 is 12.34. Note that the value did not round to 12.35.
MORE INFORMATION
Works for Windows has a Round() function that will round a number to a
specific number of digits. To truncate the number without rounding, the
formula above must be used. For example, rounding the number 123.456 to two
significant digits equals 123.46, while truncating equals 123.45. Truncating can be useful when you want to avoid errors in calculations
caused by rounding.
Modification Type: | Major | Last Reviewed: | 11/15/2004 |
---|
Keywords: | kbhowto kbinfo KB124423 |
---|
|