# Logical

> IF, AND, OR, NOT, TRUE and FALSE for table cell formulas in TXTextControl: test conditions, combine logical values and return one of two results.

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

---

Logical functions let a table cell formula in `TXTextControl` test conditions and choose a result: `IF` returns one of two values, `AND`, `OR` and `NOT` combine and negate logical values, and `TRUE` and `FALSE` return the logical constants.

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.

### Logical Functions

| Function | Description |
|---|---|
| `AND(argument-list)` | Tests if all arguments in argument-list are TRUE. The function evaluates all arguments prior to returning a value. |
| `FALSE()` | Computes the value FALSE. (A call to function FALSE is equivalent to using the logical-constant FALSE.) |
| `IF(logical-value,[value-if-true][,[value-if-false]])` | Tests logical-value, and if it is TRUE, value-if-true is evaluated and returned; otherwise, value-if-false is evaluated and returned. |
| `NOT(logical-value)` | Computes the logical negation of logical-value. |
| `OR(argument-list)` | Tests if any one or more arguments in argument-list are TRUE. The function evaluates all arguments prior to returning a value. |
| `TRUE()` | Computes the value TRUE. (A call to function TRUE is equivalent to using the logical-constant TRUE.) |

### 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.
- [Lookup and Reference](https://docs.textcontrol.com/tx-text-control-activex/reference/formula-functions/lookup-reference/llms-full.txt): cell addresses, rows, columns and choosing from a list.
- [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:** [Statistical](https://docs.textcontrol.com/tx-text-control-activex/reference/formula-functions/statistical/llms-full.txt)
- **Next:** [Lookup and Reference](https://docs.textcontrol.com/tx-text-control-activex/reference/formula-functions/lookup-reference/llms-full.txt)
