maandag 23 februari 2009

Number of decimal places

Given a value (X) and the number of significant digits (SD)
The number of decimal places is given by the following formula:
=SD - INT(LOG10(X)) - 1
You can then convert to text the appropriate value by using:
=FIXED(X, SD - INT(LOG10(X)) - 1)
ROUND will not work, since you must also change the number of fixed decimal places in the display.
The VALUE function can be used with the "FIXED text" to convert the text to a numeric value for calculations.

Geen opmerkingen: