REPT repeats a piece of text a specified number of times — sometimes used to build simple in-cell visualizations.
REPT repeats a given text string a specified number of times and joins the repetitions together with no separator.
A popular creative use is building a simple text-based bar chart directly inside a cell, using a repeated character like █ scaled to a value.
=REPT(text, number_times)| Argument | Description |
|---|---|
| text required | The text to repeat. |
| number_times required | How many times to repeat it. |
=REPT("-",10)Returns "----------", a simple divider line.
=REPT("█",B2/10)If B2 is 85, this draws 8.5 (rounded down) block characters — a crude but effective visual bar proportional to the value.
=REPT("0",5-LEN(A2))&A2Pads A2 with leading zeros up to 5 digits total — useful for ID codes.
Excel rounds down automatically, so 8.5 repetitions becomes 8 — worth knowing if your bar-chart trick looks slightly off.
ExcelPro has 700+ hands-on Excel exercises across 7 career tracks — free to start, no download needed.
Start practicing free →