# REPT Function

> Repeat a text a given number of times with the REPT formula function of TX Sheet Control: truncated count, empty result, 32,767-character limit and #VALUE!.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > REPT Function
- **187 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/rept/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/rept/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/rept/llms-full.txt

---

Repeat a text a given number of times. `text` is the text to repeat and `number_times` the number of repetitions, truncated to an integer; 0 returns empty text. A negative `number_times`, or a result longer than 32,767 characters, returns `#VALUE!`.

### Syntax

```text
REPT(text, number_times)
```

Category: Text. Minimum arguments: 2. Maximum arguments: 2.

Available for supported offline calculation.

### Examples

```text
=REPT("ab",3)
```

The formula returns ababab.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [REPLACEB Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/replaceb/llms-full.txt)
- **Next:** [RIGHT Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/right/llms-full.txt)
