Skip to main content

Excel Decimal data type

Decimal variables are stored as 96-bit (12-byte) unsigned integers, together with a scaling factor (used to indicate either a whole number power of 10 to scale the integer down by, or that there should be no scaling) and a value indicating whether the decimal number is positive or negative.

The scaling factor is the number of digits to store to the right of the decimal point, and ranges from 0 to 28.

  • With a scale of 0 (no decimal places), the largest possible value is +/-79,228,162,514,264,337,593,543,950,335.
  • With a scale of 28 decimal places, the largest value is +/-7.9228162514264337593543950335 and the smallest, non-zero value is +/-0.0000000000000000000000000001.

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>