Add Variables

Ribbon bar. Select the Data tab. In the Variables group, click Variables and on the menu, select Add to display the Add Variables dialog box.

Classic menus. On the Insert menu, select Add Variables to display the Add Variables dialog box.

Use the options in this dialog box to insert variables into the spreadsheet.

How many. Type a number in the How many box (or use the accompanying microscrolls) to specify the number of variables to be added.

After. Use the After box to specify the variable after which the new variable(s) will be added. You can type in the name of a variable or the variable number, or double-click in the box to select the desired variable.

Name. In the Name box, type the name of the variable to be added.

Type. Choose the variable's data type from the types listed in the Type drop-down list box. For more information, see Data Types.

MD code. Enter a number in the MD code box to specify a missing data code for blank cells or specific values that you intend to ignore in calculations. Note that the missing data code for a text data type is always an empty string.

Length. Type a number in the Length box (which is only available if you have selected Text as the data type for the variable) to specify the number of characters allowed for the variable.

Display format. The Display format box contains choices for the variable's viewing format (see Display Formats). If you select Number, Scientific, Currency, or Percentage as the Display format for the variable, the Decimal places field is available to further define the variable's format.

Long name (label, or formula with Functions). Type a more detailed name for the variable in the Long name box, or you can click the Functions button to add a formula as part of the variable's definition (see Spreadsheet Formulas Overview, Functions).

See also: Adding Variables, Copying Variables, Moving Variables, Deleting Variables.