# TableCellFormula Property

> Returns or sets the formula that calculates a table cell's text from other cells, with A1 or R1C1 references, relative references and number formats.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Property
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > TableCellFormula Property
- **547 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablecellformula-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablecellformula-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablecellformula-property/llms-full.txt

---

Returns or sets the table cell's formula. For each table cell a formula can be defined which is used to calculate the cell's text. The formula can contain references to other table cells in the same table. When the text of a referenced cell changes, the cell which references it is automatically updated. The [Supported Formula Functions](https://docs.textcontrol.com/tx-text-control-activex/reference/formula-functions/llms-full.txt) section lists all supported formulas. Cell references can be specified either with the A1 or with the R1C1 notation. The A1 notation specifies a table cell with a column letter and a row number, for example B3 refers to the table cell in the third row and the second column. The R1C1 notation addresses a table cell with a row number and a column number, for example R3C2 refers to the same table cell in the third row and the second column. Relative addresses can be expressed with square brackets, for example R\[-2\]C\[-3\]. The numbers inside the square brackets show how many rows or columns the cell is relative to itself. Negative row numbers mean that the referenced cell is above the cell containing the formula. Negative column numbers mean that the referenced cell is to the left of the cell containing the formula. To switch the reference style the [FormulaReferenceStyle](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formulareferencestyle-property/llms-full.txt) property can be used. The formula's result is formatted according to the format specified with the [TableCellNumberFormat](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablecellnumberformat-property/llms-full.txt) property.

Introduced: 26.0.

### Syntax

```vbscript
TXTextControl.TableCellFormula(TableId, Row, Column) [= string]
```

### Parameters

| Parameter | Description |
|---|---|
| TableId | Specifies a table. It is the same identifier set with the [TableInsert](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tableinsert-method/llms-full.txt) method. |
| Row, Column | Specify a row and column number which identifies a certain cell in the table. The first has the number 1, 1. |

### Data Types

| Name | Data type |
|---|---|
| TableId | Integer |
| Row | Integer |
| Column | Integer |
| Property value | String |

### Limitations

Run time only.

### See Also

- [Formatting Text by using Number Formats](https://docs.textcontrol.com/tx-text-control-activex/document-editor/tables/number-formats/llms-full.txt)
- [Tables](https://docs.textcontrol.com/tx-text-control-activex/document-editor/tables/llms-full.txt)
- [Using Formulas in Table Cells](https://docs.textcontrol.com/tx-text-control-activex/document-editor/tables/formulas/llms-full.txt)
- [Programming Category: Tables](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/tables/llms-full.txt)

---

## Nearby

- **Previous:** [TableCellData Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablecelldata-property/llms-full.txt)
- **Next:** [TableCellLength Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/tablecelllength-property/llms-full.txt)
