Using Formulas in Table Cells

In tables, you can use formulas in cells that are calculated based on the values from other cells. The cell that contains a formula displays the calculated value.

If the formula returns an error, the cell displays "####".

A formula is an expression that calculates a value based on the values from the cells specified in the expression.

The following functions are available and can be used in formulas:

Additionally, you can insert expressions to calculate results based on the values from the specified cells and range of cells.

A formula must start always with the equal sign (=) and can contain the following signs:

Sign Description
+ Plus
- Minus
* Times
/ Divided by
^ Exponent
() Parentheses

Specifying Cells Within Formulas

You can specify cells and ranges of cells within a formula by selecting them or by referring to them using the column and row labels.

Changing the Cell Data Type

Every cell has an assigned data type.

You can change the data type using the editing tools from the Edit Table toolbar.

The default data type is General, but you can change it in the Properties palette.

The default data type is General, but you can change it in the Properties palette or using the editing tools from the Edit Table contextual toolbar.

The default data type is General, but you can change it in the Properties palette or using the editing tools from the Edit Table contextual toolbar.

Note: You cannot change the data type of a cell that contains a formula.

The following data types are available:

Note: If a formula cannot identify the data type, it returns an error and the cell displays "####".

To change the cell data type:

  1. In the graphics area, click inside a table cell to select it.
  2. On the Edit Table toolbar, select the data type from the Data Type flyout.

Inserting Formulas

You can insert a formula into a cell with several methods:

Note: You cannot insert formulas in locked cells.

Inserting Formulas Manually

To insert formulas manually:

Note: The formula must start with the equal sign (=).

  1. Select a table cell to edit it in place:

    The cell switches to editing mode and the editing tools appear.

  2. Type the formula.

    You can use functions as in the following examples:

  3. Press Enter to calculate the result.

Inserting Formulas Using Formula Tools

Formulas are available for a selected cell in the context menu and on a contextual toolbar or ribbon, according to the selected user interface.

Formulas are available for a selected cell on a contextual toolbar.

Formulas are available for a selected cell on a contextual toolbar.

You can also use these flyouts on the Edit Table contextual toolbar to insert data types and formulas.

You can also use these flyouts on the Edit Table contextual toolbar to insert data types and formulas.

To insert formulas using formula tools:

  1. Click inside a table cell to select it.
  2. Do one of the following:
  3. Specify the cell or the range of cells corresponding to the selected formula.
  4. Press Enter to calculate the result.

Example:

The following table shows how to calculate the sum for each column.

Parent Topic

Working with Tables