SPSS Tips & Tricks #17 – Automatic recode

 In Tips & Tricks

I got a question from a user who wanted to know if there were a smart way to recode string variables – that was automatically created when opening an Excel data file into SPSS Statistics.

Yes, the answer is Automatic Recode, a really effective command.

This was something I also showed in the “continue webinar” the 18 Sep, and you can find the recording under the tab: Webinar.

Here is the data file that that I read in from Excel (I will show how to open Excel data in next blog post)

and as you can see in the column heads – there are a lot of string variables (they have this Little symbol with an a):

As an example I will do the automatic recode on the string variable Jobcategory to the right in the data file.

Command is: Transform – Automatic recode

And here you get a summary of the new variable that is called jobcat_num. It has got number codes in alphabetic order, so Administrative got code 1, Econom got code 2 and so on. Then you get all text saved as value labels, automatically!

Part from the data file when value labels are turn off:

And the same, when value labels are turn on:

Thanks for watching!

Gunilla Rudander

error: Content is protected !!