Excel like a finance pro.
← The libraryPractice · 8 questions →
Text function
REPT
Repeats text a given number of times.
OccasionalDifficulty 1000 · CapableUsage rank #130 of 520
When to use it
Repeats text a number of times. In-cell bar charts and padding.
The shape of it
- Syntax
=REPT(text, number_times)
- Example
=REPT("|",B2/10)
Worked examples
Repeat a character
=REPT("*",5) → *****
Five stars.
In-cell bar
=REPT("|",B2/1000) → ||||||||||||
B2 is 12,000: a twelve-bar in-cell chart.
Zero padding
=REPT("0",5-LEN(A2))&A2 → 00042
A2 holds "42". Pad to five digits.
Worth knowing
- An in-cell bar chart in one formula.
- Use a narrow font like Stencil or the block character UNICHAR(9608) for solid bars.
- Non-integer counts are truncated.
- TEXT(n,"00000") is simpler for numeric padding.
Where it goes wrong
- #VALUE! when the result exceeds 32,767 characters.
- Negative counts return #VALUE!.
Related
Learn the moves here — or let Wauvel run them on your numbers.
Meet your AI CFO →One CFO-grade Excel tip a week
A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.