Recode into Different Variables

The Recode into Different Variables dialog box allows you to reassign the values of existing variables or collapse ranges of existing values into new values for a new variable. For example, you could collapse salaries into a new variable containing salary-range categories.

  • You can recode numeric and string variables.
  • You can recode numeric variables into string variables and vice versa.
  • If you select multiple variables, they must all be the same type. You cannot recode numeric and string variables together.

To Recode Values of a Variable into a New Variable

  1. From the menus choose:

    Transform > Recode into Different Variables...

  2. Select the variables you want to recode. If you select multiple variables, they must be the same type (numeric or string).
  3. Enter an output (new) variable name for each new variable and click Change.
  4. Click Old and New Values and specify how to recode values.

Optionally, you can define a subset of cases to recode.

Specifying Values to Recode for New Variables

  1. From the menus choose:

    Transform > Recode into Different Variables...

  2. Select the variables you want to recode. If you select multiple variables, they must be the same type (numeric or string).
  3. Enter an output (new) variable name for each new variable and click Change.
  4. Click Old and New Values.
  5. Specify an old value and a new value.
  6. Click Add to place the specification into the Old–>New list.