Skip to main content
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
Show menu


1. The basic variable: column heading

These variables refer directly to columns in the spreadsheet. The name of the variable is the heading you enter for the column in the spreadsheet.

If you have the following data in the spreadsheet:

Data sheet

then ID_NR, TREATMENT, AGE, HEIGHT and WEIGHT are valid variables.

Remember that a variable name should not include spaces, nor the following characters: - + / * = < > # & $ | ^ : , ; . ( ) ' " [ ] { }. In addition, the variable name should not start with a number and it must be different from reserved words such as TRUE, FALSE, ROW and COLUMN. Finally, it should not be equal to the address of a spreadsheet cell such as A1, S1, AB35, IL6, etc.

2. Combination of variables

When performing statistical analyses or creating graphs, you can enter a combination of variables as a variable in the dialog panels:

Combination of variables

In this example, the variables WEIGHT and HEIGHT are combined into a new variable (the Body Mass Index) with the formula WEIGHT/(HEIGHT*HEIGHT). Any of the following operators can be used to combine variables (in order of precedence):

* /Multiplication, Division
+ -Addition, subtraction

As shown in the example, brackets can be used to change the operators' precedence.

When the cursor (the focus) is on a Variable selector, then you can press function key F8 to call the Variable formula editor for an easy to use formula editor.

3. Transformation of a variable

When a variable needs transformation, you can use one of the many MedCalc spreadsheet functions. For example, if a variable needs square root transformation you use the SQRT(variable) function as new variable:

Transformation of a variable using a mathematical function




See also