REPT returns text repeated a given number of times. With one character it builds padding, leader dots and in-cell bar charts; with a longer string it repeats a pattern. The count is truncated to an integer, zero returns empty text, and a negative count raises #VALUE!.
Returns text. The count is truncated toward zero; the result is capped at 32,767 characters.
Truncation, zero and computed bars, measured live. Click any row to load it.
| Expression | Result | Why |
|---|---|---|
| =REPT("*",5) | ***** | Five stars |
| =REPT("ab",3) | ababab | Pattern repeated |
| =REPT("-",10) | ---------- | Ten dashes |
| =REPT("=",B2) | ====== | Bar: B2=6 |
| =REPT("|",3) | ||| | Three pipes |
| =REPT("0",4) | 0000 | Zero padding |
| =REPT(A2,2) | AlphaAlpha | Repeat a cell value |
| =REPT("x",0) | Zero gives empty |
Edit the table or type any formula — the engine evaluates instantly. Load a preset to build stars, separators and an in-cell bar.
8 failure patterns mined from actual user reports on Reddit, Stack Overflow and Super User — each with the authentic symptom, root cause, a fix, and a runnable formula. Not textbook theory.
REPT is a core text function present in every Excel version and platform.
| Platform | Support | Notes | Gotcha |
|---|
REPT is one piece. The full course walks the toolkit end to end with live, measured examples.