ReferenceFunctionsText Functions
REPT
REPT: Repeats text a given number of times.
Summary
Repeats a text string a specified number of times.
Remarks
- Repeat count is truncated to an integer.
- Negative counts return
#VALUE!. - Output longer than 32,767 characters returns
#VALUE!. - Non-text first argument is coerced to text.
Examples
Repeat text three times
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
ababab
Negative count
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
#VALUE!
Related functions
FAQ
Can REPT return very long strings?
Only up to 32,767 characters; longer results return #VALUE! like Excel.
Runtime metadata
Category
Text
Signature
REPT(arg1: Any, arg2: Any)Arity
min 2, max 2
Arguments
arg1Any · Scalar
arg2Any · Scalar
Caps
PURE
Source