Help Centre › Functions & Formulas
For a full list of available calculation functions, please read What calculation functions are supported.
This article describes the formula syntax and usage of the REPT function and is applicable to both the RPA and Cloud Automate's calculate functions.
Description
Repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text string.
Syntax
REPT(text, number_times)
The REPT function syntax has the following arguments:
- text - Required. The text you want to repeat.
- number_times - Required. A positive number specifying the number of times to repeat text.
Remarks
- If number_times is 0 (zero), REPT returns "" (empty text).
- If number_times is not an integer, it is truncated.
Example
| Formula | Description | Result |
| =REPT("*-", 3) | Displays an asterisk and a dash (*-) 3 times. | *-*-*- |
| =REPT("-",10) | Displays a dash (-) 10 times. | ---------- |
Errors
For a full list of formula errors, please read Formula errors.