Excel
REPT function in Excel
Repeats text a given number of times
=REPT(text, number_times)REPT syntax and parameters
Two arguments, two required.
- textstringRequired
The text you want to repeat.
- number_timesnumberRequired
A positive number specifying the number of times to repeat text.
REPT examples
Formulas you'll actually reuse.
A star rating drawn from a 1–5 score:
=REPT("★", B2)Result
"★★★★"Zero-pad an ID to six digits:
=REPT("0", 6 - LEN(A2)) & A2Result
"010422"
REPT in Google Sheets
Same name — your formula ports as-is.
Try REPT in the playground
Edit the example — nothing to install.
Preloaded with the REPT formula from Example 1 — change anything and watch it respond.
Loading the editor…
Related functions
More ways Excel gets this done.
- ARRAYTOTEXTReturns an array of text values from any specified rangeTextNo Google Sheets equivalent
- CHARReturns the character specified by the code numberTextGoogle Sheets
- CLEANRemoves all nonprintable characters from textTextGoogle Sheets
- CODEReturns a numeric code for the first character in a text stringTextGoogle Sheets
- CONCATCombines the text from multiple ranges and/or strings, but it doesn't provide the delimiter or IgnoreEmpty arguments.TextGoogle Sheets
- CONCATENATEJoins several text items into one text itemTextGoogle Sheets