Excel like a finance pro.
REPT
Text & cleanupIn-cell bar charts: one formula turns a variance column into something you can read at a glance.
Difficulty
1What is it?
REPT repeats a piece of text a given number of times. On its own that sounds like a novelty. Repeat a block character in proportion to a value and you get a bar chart inside the cell, sitting right beside the numbers, with no chart object to position, resize or lose when a row is inserted. Scale it against the largest value so the longest bar fits the column. It's the cheapest visual in Excel, and it prints, exports and survives a copy-paste in a way a real chart does not.
2What it looks like
REPT(text, number_times)- text
- What to repeat — for a bar, a block character like "█" or a plain "|".
- number_times
- How many times. Decimals are truncated. The result is capped at 32,767 characters.
3When you use it
- A bar beside each customer's revenue, scaled to the largest.
- A visual variance column that shows size at a glance.
- A simple progress indicator against a target.
4See it in action
Change the inputs — the formula and result update live. Prefer the real thing? Download the Excel file and open it in Excel.
Change a customer's revenue. The bars rescale to the biggest.
=REPT("█", ROUND(B2/MAX($B$2:$B$5)*20, 0))Globex ████████████████████| A | B | C | |
|---|---|---|---|
| 1 | Customer | Revenue | Result |
| 2 | Globex | Globex ████████████████████ | |
| 3 | Umbrella | 63,000 | Umbrella █████████████ |
| 4 | Acme | 42,000 | Acme █████████ |
| 5 | Initech | 27,500 | Initech ██████ |
| 6 | No chart object — it prints, exports and survives an inserted row. |
The lime cell holds the formula — click it (or any cell) to see its contents in the bar above, just like Excel. Edit the blue cells to watch it recompute.
5Common errors
#VALUE!number_times is negative — a loss or a negative variance.Fix: Use ABS for the length and colour negatives separately, or MAX(0, …) to show nothing.
Bars run off the edgeThe repeat count is the raw value, not scaled.Fix: Divide by the largest value and multiply by a fixed width, as above.
Bars look uneven or jaggedA proportional font makes some characters wider than others.Fix: Use a block character, or set the column to a monospace font.
6Better functions & alternatives
- Sparklines — A real mini chart inside a cell, including trends over time. See the tip.
- Data bars — Conditional formatting that draws the bar behind the number itself — no extra column at all.
Want REPT already wired into a model? Wauvel's free tools download as branded, formula-driven Excel.
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.