Column Formulas

Calculating using other columns

As an example, let's say you had two data columns (column A and column B) and wanted a third column to show the sum of A and B

Example_start

Hover your mouse over third column's type (It's currently 'Unknown')

Example_hover

Now, click on 'convert to formula column'. A window will pop up.

Example_formula_edit

We want to add columns A and B, so type 'col(A) + col(B)' in the text box. Next, click on OK.

Example_done

Filling in columns automatically using 'row'

The first example showed you how to calculate using column data. You can also access the row number of a column. If, for example, you wanted a column with data like this:

Example_manual

You could fill it in automatically with a formula of 'row * 10':

Example_formula

Formula Syntax

Column formulas use the same syntax as curve-fit formulas, except that instead of curve fit variables, you reference columns and rows. Here are some examples

WhatExampleExplanation
Absolute column referencecol(A)References the data in column A
Relative column referencecol(-2)Second column to the left
col(+3)Third column to the right
Row offsetscol(A,-3)Column A, three rows up
col(-2,+3)Two columns to the left, three rows down
Row DatarowFills each row with the row number
row * 10Fills each row with 10 times the row number

For information on operators, operator precedence and functions, see curve-fit formulas.

Converting back to a data column

You can convert a formula column back to a data column. If you do this, the column will be filled in with the current formula column values, but it will now be editable.

Hover your mouse above the column's type

Click on 'Convert to data column'

Convert_to_data_column