PrecisionCalc
xl
Precision
Get Your Numbers Right
Format Decimal Place
On editions that offer decimal place formatting, several xlPrecision functions allow you to easily specify that you want digits to always appear exactly out to whatever decimal position you specify. So instead of a list of xlPrecision results that looks like this:
123.45 |
12.34567 |
1,923.68 |
12,569 |
You can instead easily make the results look like this:
123.45 |
12.35 |
1,923.68 |
12,569.00 |
Or like this:
123.4500 |
12.3457 |
1,923.6800 |
12,569.0000 |
Like Excel's number formatting,
format_decimal_place rounds
to the nearest. For example:
The format_decimal_place parameter is available
on the following xlPrecision functions:
xlpADD
xlpSUBTRACT
xlpMULTIPLY
xlpDIVIDE
xlpROOT
xlpPOWER
xlpFORMAT
See the function reference for those functions for
information on how to use the format_decimal_place paramer. To see the function reference for any of these
functions, click on them in the list above.
In future versions, format_decimal_place will be available on more xlPrecision functions. Until then, you can use the xlpFORMAT function to pad zeros to any result of any xlPrecision function, or to any number formatted in Excel as Text.