View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Reading an excel file in SPSS

Insert a column next to the DOB column

assume the first cell with DOB is F2, in G2 (the new column) put in the
formula

=DateValue("1-" & trim(F2))
then drag fill down the column (or select G2 and double click on the little
black square on the lower right corner of the highlight.

Now select column G and do Edit=Copy, then immediately Edit=PasteSpecial
and select Values

format the column with a date format. If all the cells resolve OK, then you
can delete column F.

--
Regards,
Tom Ogilvy



"Gary" wrote in message
...
I have an excel file that has a variable called date of birth (DOB) that

is in the following form Jun-58 to represent June 1958. The file has 11,000
cases which creates a myriad of DOB options. I have imported the data file
into SPSS, a statistical package for the social sciences. SPSS does not
have a data format option to recognize the DOB format produced in the excel
file since it is alphnumeric with a dash. Is there an "easy" way to
recompute the DOB into a numeric variable in excel, given the format that it
is currently in?