# Formula Designer

> Find functions and build arguments in the Formula Designer, preview the result, trace precedents and dependents, and write formulas in code with setFormula.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Sheet Control > Spreadsheet Editor > Formula Designer
- **810 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/formula-designer/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/formula-designer/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/formula-designer/llms-full.txt

---

Which function adds a range, and which arguments does it take? The **Formula Designer** answers both: it helps you discover functions and build their arguments, and it previews the result before the formula goes into the cell. Open it with the button beside the formula bar or with **Shift+F3**.

The **Formulas** tab of the ribbon provides the commands for name management, dependency tracing and recalculation. The formula bar also accepts a formula directly for the selected cell.

### Build a Formula

1. Select the destination cell before you open the designer.
2. Search for a function by name or category, and inspect its signature.
3. Enter the arguments, or choose worksheet ranges.
4. Review the result preview and apply the formula.

Text arguments and criteria need quotes. Formula function names, the address grammar and interface labels serve different purposes.

The [function reference](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/llms-full.txt) lists all names this release recognizes, with their arguments, examples, provider requirements and approximation flags. Some functions require data that the application provides.

> Important
>
> **Recognized Is Not Fully Supported.** A recognized function name does not imply support for every Excel integration or argument combination.

### Read the Designer

![Formula Designer with the function library, SUM arguments, the formula SUM(A10:C12), result preview 33 and destination K10](https://docs.textcontrol.com/assets/img/tx-sheet-control/formula-designer.9feb0bd6.webp)

The function list helps you find the operation, and the argument fields describe its inputs. The example preview evaluates `SUM(A10:C12)` to `33`; a sales total can instead use `SUM(F4:F27)` for the detail Revenue cells. Check the destination and the preview before you choose **Apply Formula**.

The preview is a draft calculation, so **Cancel** leaves the formula of the destination unchanged. The function library and formula builder occupy a fixed workspace. Long function lists, argument lists and formulas scroll within it instead of moving the header or **Apply Formula** action. The dialog uses the shared editor heading and footer while keeping its function-search workflow.

### Inspect Dependencies

Trace the precedents and dependents of a selected formula with the formula inspection controls or with the supported `EditorUi` methods [tracePrecedents](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/editorui/traceprecedents-method/llms-full.txt) and [traceDependents](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/editorui/tracedependents-method/llms-full.txt). Trace arrows are screen-only aids; they do not become printed report content. Clear them, with [clearArrows](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/editorui/cleararrows-method/llms-full.txt) in code, when they no longer help the user understand the calculation.

Check formula errors after loading or changing source data. Different failures need different corrections, and these conditions are not equivalent:

- an invalid name
- an unavailable data provider
- a missing reference
- division by zero
- a blocked array spill

### Write Formulas in Code

In code, write a formula with [Cell.setFormula](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/cell/setformula-method/llms-full.txt), as in `cell.setFormula('=SUM(B2:B10)')`, or a formula matrix with [Range.setFormulas](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/range/setformulas-method/llms-full.txt), rather than hiding a formula inside a literal write. Set typed numeric inputs with [`setValues()`](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/browser/range/setvalues-method/llms-full.txt).

### Next Steps

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt): understand how formulas calculate, with references, arrays and errors.
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt): add custom functions and the formula providers that supply application data.
- [Named Ranges and External References](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/named-ranges/llms-full.txt): give ranges and constants names that formulas use.

---

## Nearby

- **Previous:** [Chart Dialogs](https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/chart-dialogs/llms-full.txt)
- **Next:** [Appearance and Localization](https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/appearance/llms-full.txt)
