Repeats a given text string a specified number of times.
Syntaxe
REPT(text, number_times)Arguments
textobligatoire
The text string you want to repeat.
number_timesobligatoire
A positive number specifying how many times to repeat the text.
The REPT function allows you to fill a cell with a repeated character or string. It is commonly used to create simple in-cell data visualizations, such as progress bars or star ratings.
=REPT("-", 5)→-----Repeats the hyphen character five times.
=REPT("★", 3)→★★★Repeats the star symbol three times to create a rating visual.
Select the target cell
Click on the cell where you want the repeated text to appear.
Enter the formula
Type =REPT( followed by the text in quotes and the number of repetitions, then close the parenthesis.
Press Enter
Press the Enter key to display the repeated string.
The function will return an empty string.
Yes, but the number will be treated as text and repeated as a string.