Hi all
Please let me know if this isn't a suitable place to post this question.
In SPSS, I have a good number of categorical variables containing values and value labels.
In excel, I have the same variables but the data is in string format.
E.g., in the SPSS file, if there were a categorical variable called 'pet_type', and the value '2' had the value label 'dog', then in the excel file, in the 'pet' column, there would just be the word 'dog'.
I'm looking for the easiest and least error-prone method of getting the excel data into the SPSS file.
Ideally, I need to turn all the 'dog's into the value '2' and then merge this into the SPSS database, and I could write some syntax for this. However, I have dozens of different variables each with multiple unique categories of data and so writing this code would be pretty time consuming.
Best case I can think of is that there would be an easy way to generate syntax automatically from the existing SPSS variables e.g., something that takes the values and value labels of the categorical variables and automatically generates a syntax that would transform any string data into this format. Does this exist?
Or does anyone have a better method to suggest?
Thanks very much