Variable Labels and Value Labels in SPSS

by Karen Grace-Martin

SPSS Variable Labels and Value Labels are two of the great features of its ability to create a code book right in the data set.  Using these every time is good statistical practice.

SPSS doesn’t limit variable names to 8 characters like it used to, but you still can’t use spaces, and it will make coding easier if you keep the variable names short.  You then use Variable Labels to give a nice, long description of each variable.  On questionnaires, I often use the actual question.

There are good reasons for using Variable Labels right in the data set.  I know you want to get right to your data analysis, but using Variable Labels will save so much time later.

1. If your paper code sheet ever gets lost, you still have the variable names.

2. Anyone else who uses your data–lab assistants, graduate students, statisticians–will immediately know what each variable means.

3. As entrenched as you are with your data right now, you will forget what those variable names refer to within months.  When a committee member or reviewer wants you to redo an analysis, it will save tons of time to have those variable labels right there.

4.  It’s just more efficient–you don’t have to look up what those variable names mean when you read your output.

The really nice part is SPSS makes Variable Labels easy to use:

1. Mouse over the variable name in the Data View spreadsheet to see the Variable Label.

2. In dialog boxes, lists of variables can be shown with either Variable Names or Variable Labels.  Just go to Edit–>Options.  In the General tab, choose Display Labels.

3. On the output, SPSS allows you to print out Variable Names or Variable Labels or both.  I usually like to have both.  Just go to Edit–>Options.  In the Output tab, choose ‘Names and Labels’ in the first and third boxes.

Value Labels are similar, but Value Labels are descriptions of the values a variable can take.  Labeling values right in SPSS means you don’t have to remember if 1=Strongly Agree and 5=Strongly Disagree or vice-versa.  And it makes data entry much more efficient–you can type in 1 and 0 for Male and Female much faster than you can type out those whole words, or even M and F.  But by having Value Labels, your data and output still give you the meaningful values.

Once again, SPSS makes it easy for you.

1. If you’d rather see Male and Female in the data set than 0 and 1, go to View–>Value Labels.

2. Like Variable Labels, you can get Value Labels on output, along with the actual values.  Just go to Edit–>Options.  In the ‘Output Labels’ tab, choose ‘Values and Labels’ in the second and fourth boxes.

Want to learn more? If you’re just getting started with data analysis in SPSS, or would like a thorough refresher, please join us in our online workshop Introduction to Data Analysis in SPSS.

Bookmark and Share

{ 17 comments… read them below or add one }

Nyeko charles

when i don’t assign labels to the variables, what will happen during the analysis?


Karen Grace-Martin

Nothing really happens to the analysis, other than it might be harder for you to keep track of what the results mean. It’s easier to get mixed up than you’d think.



What do you enter in the data view–the acutal variables or the codes. I typed secondary into the data view, it stopped at r and cound not enter the y. If the variable is already coded in the label section in variable view, what do you enter in the data view–the codes or the actual variable


Nicole G.

Hi I am doing a class project for my advanced research methods course and I am having issues labeling the number of variables…

I am doing a repeated measures (within subjects) and when I add the number of levels which is 6, it does not let me add it, there are no spaces or ” -” in there, it just says there are “Variable name contains an Illegal character”

I would really appreciate the help! Thanks in advance.



I am a stats TA and had a student working on some charts. She noticed that they started looking odd and called me over when we noticed the data had all been completely changed to what seemed like random numbers that meant nothing to her. She has no clue if she hit a wrong key, but her entire data set had been changed. She closed SPSS and went to re-open it and then she was unable to access her data all together. She was using an macbook when this happened. Curious if this has happened to anyone or if you know how to get this fixed. Thanks!


Karen Grace-Martin

Hi D, I have never seen this happen personally. I would contact SPSS support.



do i have to write same value labels separately for each item or there is any way to copy these labels for other items as well.


Karen Grace-Martin

You can assign the same labels to a bunch of variables via syntax. Look up the Value Labels command in the Command Syntax Reference. It’s in the SPSS help menu.



Very useful information! A great big thank you!!!


Drive Research Syracuse

There are benefits to using both large and small scales in market research. It really depends on your needs and objectives from your question. Here is our overview of large and small scales:

Thanks for sharing Karen, definitely sparking a lot of discussion here!

– George



How can I import a codebook of value labels into SPSS? I have a word file codebook describing value labels (e.g. village names for codes 1 to 38), and a separate excel table with the data (e.g. household i, village j). I would like to import the excel table with the data while also importing the value labels without having to copy them manually (I have a database with >100 questions and >30 codes for each value). How to do that in SPSS?
Thank you for your advice.



My patient data file has a variable named “Medical history” where i have inputs like asthma, hypertension, asthma and hypertension, diabetes, diabetes and hypertension, Arthritis, Arthritis and asthma. How to give label for such a value?



I have imput the values and my frequency tables show the catorgories by i still have value 1,2 etc on the horizontal axis
Am i doing something wrong



Hi Jordan,

There is an option for tables to show either the values or the value labels. You can change this in the Options, which is usually under the Edit menu.



That option does not affect the horizontal axis on the histogram. Like he said, the label values show in the frequency tables but they don’t show in the graph only the numerical value assigned shows



Do the values have to be whole numbers? I am trying to group my data such as 4.4-5 is well above average, 3.6-4.3 is somewhat above average, and so on, but SPSS will not allow it. Is there another way?



They do. You’ll have to first recode those ranges into a new variable with whole numbers. Then label that new one.


Leave a Comment

Please note that, due to the large number of comments submitted, any comments on problems related to a personal study/project will not be answered. We suggest joining Statistically Speaking, where you have access to a private forum and more resources 24/7.

Previous post:

Next post: