Fill column
With the Fill column command you can fill an entire column, or a range of rows in a column, with a formula.
You can select two options:
Convert formulas to values: to convert the formulas to their calculated values.
Fill empty cells only: to fill only empty cells with the new formula, and so saving the contents of the
non empty cells in the column.
Select the
button to call the Variable editor dialog box (see p. 39).
In the following example, rows 1 to 100 of column A will be filled with the result of the RANDNORM(0,1)
function. This function generates random numbers drawn from a Normal distribution with mean 0 and
standard deviation 1.
When you save the data then the formulas that you have entered in this dialog box will also be saved in the
MedCalc data file, so you can easily re use them at a later stage.
The Fill column command can also be used to clear a range of cells in a column, by letting the Fill with field
blank.
Some examples of useful formulas are given in the following table.
Fill with:
Result:
SQRT(LENGTH)
fill with the square root of variable LENGTH
ROW
the cells will be filled with the row number
IF(var<20, A , B )
recoding of variable var into two classes A and B
RAND(2)
the cells will be filled with 1 or 2 at random
RANDNORM(0,1)
fill with random numbers from a Normal distribution with
mean 0 and standard deviation 1
VAR1+VAR2
fill with the sum of the variables VAR1 and VAR2
the cells will be cleared (empty Fill with field)
Enter key moves cell pointer
With these commands you control the movement of the cell pointer in the spreadsheet:
Down: After pressing the Enter key, the cell pointer will move to the next row in the spreadsheet.
Right: After pressing the Enter key, the mouse will move to the next column in the spreadsheet.
38
New Page 1