# Lookup and Reference

> ADDRESS, CHOOSE, COLUMN, COLUMNS, ROW and ROWS for table cell formulas in TXTextControl: build cell addresses and count rows and columns of references.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control ActiveX > API Reference > Supported Formula Functions > Lookup and Reference
- **484 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/formula-functions/lookup-reference/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/formula-functions/lookup-reference/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/formula-functions/lookup-reference/llms-full.txt

---

Lookup and reference functions of a table cell formula in `TXTextControl` work with cell addresses: they create an address from a row and column number, return the row or column number of a reference, count the rows or columns of an array and pick an argument from a list by its position.

Argument types, restrictions and return values of each function are defined in Office Open XML File Formats, ISO/IEC 29500-1, chapter 18.17.7 Predefined Function Definitions.

### Lookup and Reference Functions

| Function | Description |
|---|---|
| `ADDRESS(row-number,col-number[,[ref-type][,[A1-ref-style-flag][,sheet-name]]])` | Creates a cell address, given the specified row and column numbers. |
| `CHOOSE(index,argument-list)` | Selects the argument in argument-list that corresponds by position to index. |
| `COLUMN([reference])` | Finds the number of the column(s) corresponding to reference. If reference is omitted, the behavior is as if reference referred to the cell containing the formula. |
| `COLUMNS(array)` | Finds the number of columns corresponding to array. (Limitation: Only supported for cell references and cell reference ranges.) |
| `ROW([reference])` | Finds the number of the row(s) corresponding to reference. If reference is omitted, the behavior is as if reference referred to the cell containing the formula. |
| `ROWS(array)` | Finds the number of rows corresponding to array. (Limitation: Only supported for cell references and cell reference ranges.) |

### Related Pages

- [Using Formulas in Table Cells](https://docs.textcontrol.com/tx-text-control-activex/document-editor/tables/formulas/llms-full.txt): calculate cell text with formulas.
- [Tables](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/tables/llms-full.txt): `TableCellFormula` and the other members for tables and cells.
- [Mathematical and Trigonometric](https://docs.textcontrol.com/tx-text-control-activex/reference/formula-functions/mathematical-trigonometric/llms-full.txt): arithmetic, rounding, logarithms, trigonometry and sums.
- [Statistical](https://docs.textcontrol.com/tx-text-control-activex/reference/formula-functions/statistical/llms-full.txt): averages, counts, maximums and minimums.
- [Logical](https://docs.textcontrol.com/tx-text-control-activex/reference/formula-functions/logical/llms-full.txt): AND, OR, NOT, IF, TRUE and FALSE.
- [Information](https://docs.textcontrol.com/tx-text-control-activex/reference/formula-functions/information/llms-full.txt): test the type and content of values and cells.

---

## Nearby

- **Previous:** [Logical](https://docs.textcontrol.com/tx-text-control-activex/reference/formula-functions/logical/llms-full.txt)
- **Next:** [Information](https://docs.textcontrol.com/tx-text-control-activex/reference/formula-functions/information/llms-full.txt)
