Microsoft KB Archive/242330

= Works: How to Preserve Leading Zeros in a Number in a Spreadsheet Cell or Database Field =

Article ID: 242330

Article Last Modified on 1/25/2007

-

APPLIES TO


 * Microsoft Works 6.0
 * Microsoft Works 7.0
 * Microsoft Works 2000 Standard Edition
 * Microsoft Works Suite 2000
 * Microsoft Works Suite 2001
 * Microsoft Works Suite 2004

-



This article was previously published under Q242330



SUMMARY
This article describes how to preserve leading zeros in a number in a Microsoft Works spreadsheet cell or database field.

For example, if you type a five-digit ZIP code that begins with a zero in a cell or field, Works truncates the leading zero by default.

Note This behavior does not occur if you type a number that contains a HYPHEN (-), such as a nine-digit ZIP code, because Works automatically formats any number that contains a HYPHEN (-) as text.



Database
To preserve leading zeros in a number in a Works database field, follow these steps:
 * 1) Select the field where you want to preserve leading zeros.
 * 2) On the Format menu, click Field.
 * 3) Under Format, click Number.
 * 4) In the Appearance box, click 01235.
 * 5) In the Number of digits box, type the maximum number of leading zeros you want to preserve, and then click OK.

For example, to preserve leading zeros for a field that contains a five-digit ZIP code, type 5 in the Number of digits box.

To preserve leading zeros in a number in a Works database field when you merge the field into another document, save the database as a Text & Commas (*.csv) file, and then use the .csv file as the data source for the merge operation.

Spreadsheet
To preserve leading zeros in a number in a Works spreadsheet cell, follow these steps:
 * 1) Select the cells where you want to preserve leading zeros.
 * 2) On the Format menu, click Number.
 * 3) Under Format, click Leading Zeros.
 * 4) In the Number of digits box, type the maximum number of leading zeros you want to preserve, and then click OK.

For example, to preserve leading zeros in a cell that contains a five-digit ZIP code, type 5 in the Number of digits box.

Additional query words: w_works works2k w2001 db ss fmt

Keywords: kbfaq kbhowto kbui KB242330

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.