What REPT does
REPT repeats the same text string as many times as you specify. It is useful for padding values, building quick visual bars, or generating repeated separators inside formulas.
Practical examples
Repeat a short pattern several times
=REPT("*-",3)
This returns the pattern three times in one text string.
Build a simple text bar
=REPT("-",10)
This is a quick way to generate divider lines or small text-based indicators.
Common mistakes and notes
The output must stay under Excel's text limit
Microsoft notes that REPT returns #VALUE! if the result would exceed 32,767 characters.
Non-integer repeat counts are truncated
If number_times is not a whole number, Excel truncates it before building the final text.