Draw a horizontal bar right inside a cell — no chart needed. REPT repeats a block character in proportion to a percentage, giving each row a tiny progress or share-of-total bar for a compact dashboard.
The example
75% → a 15-block bar.
| A | B | |
|---|---|---|
| 1 | % | Bar |
| 2 | 75% | ███████████████ |
The formula
The formula:
How it works
How it works:
REPT(char, n)repeats a character n times; scale n to the percentage.- Multiply the percent by a max width (e.g. 20) and ROUND for whole blocks.
- Use a full + empty character pair for a framed bar:
REPT("█",n) & REPT("░",20-n). - Set the cell font to a monospace font so bars align across rows.
It scales to a whole column instantly. Drop the REPT formula beside a percentage column and every row gets a proportional bar — a lightweight alternative to conditional-formatting data bars that copies, prints, and pastes anywhere. Append the number (& " " & TEXT(percent,"0%")) so the bar and its value sit together.
Try it: interactive demo
Percentage.
%Variations
Framed bar
Full + empty:
Bar plus value
Label it:
Share of total
From a value:
Pitfalls & errors
Round the count. REPT needs a whole number of repeats.
Monospace font. Use Consolas so bars line up across rows.
Cap at the width. Clamp n to the max so over-100% doesn’t overflow.
Practice workbook
Frequently asked questions
How do I make an in-cell bar in Excel?
How do I frame the bar with an empty part?
Why don't my bars line up?
Stop fighting formulas. Learn them in a day.
This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class