Repeat a specific text string by a number of instances.
REPT(text, number_times)
Repeat a text string or number by a number of instances, using either defined values (e.g. "string") or cell references (e.g. C3).
REPT syntax requires the defined value or cell reference to be repeated and the number of times to repeat it.
REPT with a text string.
In the example below, the REPT function is used to repeat different characters a different number of times. You can create simple histograms using different symbols, characters or fonts (such as the use of Wingding below).
Use the REPT function to repeat a text string by a number of instances.

REPT with a number.
In the example below, the REPT function is used to repeat different numbers a different number of times. Currency symbols are not repeated (unless enclosed in quotes).
Use the REPT function to repeat a number by a number of instances

Syntax
The REPT function consist of 2 arguments:
- text. Required. The text to be repeated.
- number_times. Required. The number of times the text is to be repeated.
Try it now!
Enter your formulas into the grey cells.
Scope
REPT() can be applied to cell references, text or numbers.
|
=REPT(C3,5) || returns ***** where cell C3 contains the character '*'. |
|
=REPT("*",5) || returns *****. |
|
=REPT(123,3.99) || returns 123123123. number_times is not an integer so is truncated to 3x. |
Caveats
number_times:
- If number_times is negative, a #VALUE! error is returned.
- If number_times is zero, empty text ("") is returned.
- If number_times is a non-integer, the values after the decimal point are ignored.
- The result of the REPT function can not be longer than 32,767 characters or REPT returns a #VALUE! error.
Functions Category