Date: Mon, 25 Mar 2002 11:18:27 -0500
Reply-To: Mark Casazza <Mark.Casazza@domino1.cuny.edu>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Mark Casazza <Mark.Casazza@domino1.cuny.edu>
Subject: Re: Please remind me ....
Content-Type: text/plain; charset="iso-8859-1"
Even if you make the variable a string in SPSS Excel will see it as number
and discard the leading zeros. The easiest way to fix this is in Excel.
Select the column with the variable, right click and select format cells,
then go to the number tab and select custom. In the Type box, type 0000
(four zeros). This will force Excel to display leading zeros for any number
with three or fewer digits (at four digits you don't need the leading
Mark V. Casazza
Director of Academic Information
The City University of New York
555 W. 57th St. 16th Floor
New York, NY 10019
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of
Sent: Monday, March 25, 2002 11:03 AM
Subject: Please remind me ....
Hi listers !
I know I have seen this before in this list but cannot find it now.
I have a 1-4 digit numerical variable in SPSS. I would like to convert it
into a 4 character string variable (right justified) with leading zeros.. I
want to later export this to Excel keeping the variable with leading zeros.
I managed to fix it in SPSS with the Nw-format but after export to Excel, no
leading zeros showed.
Thankful for any help
National Institute of Public Health