Excel: Methods to Automatically Add Zeros After a Number

Last reviewed: October 10, 1995
Article ID: Q74523
The information in this article applies to:
  • Microsoft Excel for Windows, versions 2.x, 3.0, 4.0
  • Microsoft Excel for OS/2, versions 2.2, 2.21, 3.0
  • Microsoft Excel for the Macintosh, versions 4.0, 5.0, 5.0a
  • Microsoft Excel for Windows 95, version 7.0

SUMMARY

There are two ways to automatically add zeros after a number in a worksheet. Both methods are described below.

MORE INFORMATION

These methods only work for integers. Real numbers with significant digits to the right of the decimal will not be affected.

Method 1: To add zeros after the number, without changing the value of the

          entered number, use the following steps:

          1. In cell A1, enter a number such as "45" (without the quotation
             marks).

          2. With cell A1 active, on the Format menu, click Cells, and
             click the Number tab. (In Microsoft Excel versions 4.0a and
             earlier, click Number on the Format menu.)

          3. Under category, click Custom, and create the following custom
             number format ##",000,000".

          This format will display the number 45 as "45,000,000" in cell
          A1. Note that the value of the number is still 45.

Method 2: To add the zeros and change the value of the entered number:

          1. On the Tools menu, click Options, and click the Edit tab. (In
             Microsoft Excel versions 4.0a and earlier, click Workspace on
             the Options menu.)

          2. Select the Fixed Decimal check box (place a check mark in it).
             In the Places field, enter "-6" (without the quotation marks),
             and click OK.

          3. In cell A2, type a number such as "45" (without the quotation
             marks).

          This procedure will display the number 45 as 45000000 in cell A2.
          The value of the number is 45000000.

For more information about the fixed decimal feature, click the Index tab in Microsoft Excel version 7.0 Help, type the following text

   fixed decimals

click the "Type numbers with fixed decimal places" topic, and then click Display.

REFERENCES

"Microsoft Excel User's Guide, Book 1" version 4.0, page 220 "Microsoft Excel User's Guide, Book 2" version 4.0, page 191 "Microsoft Excel User's Guide" version 3.0, pages 188 and 551 "Microsoft Excel Reference Guide" version 2.1, pages 321-326 and 584


KBCategory: kbusage
KBSubcategory:

Additional reference words: 2.0 2.00 2.01 2.1 2.10 2.2 2.20 2.21 3.0
3.00 4.0 4.00 5.00 5.00c 7.00 howto spreadsheet


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 10, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.