Excel data bars: in-cell bar charts step by step
Turn numbers into bars inside cells: setting up data bars, the Total-row trap, Show Bar Only, a fixed 100% scale and a REPT-based in-cell chart.
Data bars are a type of conditional formatting: Excel draws a colored bar inside each cell, and its length depends on the value. The largest number gets the longest bar, the smallest gets the shortest. Your table turns into a mini chart while the numbers stay in place.
When to use them: comparing sales by manager, eyeballing stock levels, tracking plan completion. In a 30-row table your eye finds the strongest and weakest rows in a second — no separate chart needed.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Manager | Sales, mln UZS | ||
| 2 | Aziz | 42 | ||
| 3 | Dilnoza | 58 | ||
| 4 | Javohir | 31 | ||
| 5 | Malika | 66 | ||
| 6 | Sardor | 24 | ||
| 7 |
Adding data bars — 4 steps
1
Select only the number cells — no header and no Total row. Here that is B2:B6.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Manager | Sales, mln UZS | ||
| 2 | Aziz | 421 | ||
| 3 | Dilnoza | 58 | ||
| 4 | Javohir | 31 | ||
| 5 | Malika | 66 | ||
| 6 | Sardor | 24 | ||
| 7 |
2
On the Главная tab, click Условное форматирование and point to Data Bars.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Manager | Sales, mln UZS | ||
| 2 | Aziz | 42 | ||
| 3 | Dilnoza | 58 | ||
| 4 | Javohir | 31 | ||
| 5 | Malika | 66 | ||
| 6 | Sardor | 24 | ||
| 7 |
3
Pick a style: Gradient Fill (the color fades toward the end) or Solid Fill (one even color). Hover over an option to preview it in the table — nothing changes until you click.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Manager | Sales, mln UZS | ||
| 2 | Aziz | 42 | ||
| 3 | Dilnoza | 58 | ||
| 4 | Javohir | 31 | ||
| 5 | Malika | 66 | ||
| 6 | Sardor | 24 | ||
| 7 |
4
Done. Change any number in column B and the bars redraw themselves — the rule is live.
How bar length is calculated
By default the minimum and maximum are set to Automatic: if all numbers are positive, the scale runs from 0 to the largest value. That is why Javohir’s bar (31 mln) is less than half of Malika’s (66 mln).
- Empty and text cells get no bar.
- Formula results do get bars — when the result changes, so does the bar.
- For negative numbers Excel draws an axis inside the cell: negative bars go left in red, positive bars go right. Perfect for a profit/loss column.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Manager | Sales, mln UZS | ||
| 2 | Aziz | 42 | ||
| 3 | Dilnoza | 58 | ||
| 4 | Javohir | 31 | ||
| 5 | Malika | 66 | ||
| 6 | Sardor | 24 | ||
| 7 | Total | 2211 | ||
| 8 |
Bars without numbers — Show Bar Only
1
Create a separate “chart” column next to the numbers: type =B2 in C2 and fill it down to C6.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Manager | Sales, mln UZS | Chart | |
| 2 | Aziz | 42 | 42 | |
| 3 | Dilnoza | 58 | 58 | |
| 4 | Javohir | 31 | 31 | |
| 5 | Malika | 66 | 66 | |
| 6 | Sardor | 24 | 24 | |
| 7 |
2
Select C2:C6 and add data bars to it as shown above.
3
Go to Условное форматирование → Manage Rules..., select the rule, click Edit Rule... and tick Show Bar Only.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Manager | Sales, mln UZS | Chart | |
| 2 | Aziz | 42 | 42 | |
| 3 | Dilnoza | 58 | 58 | |
| 4 | Javohir | 31 | 31 | |
| 5 | Malika | 66 | 66 | |
| 6 | Sardor | 24 | 24 | |
| 7 |
4
Click OK: the numbers in column C disappear and only the bars remain. Column B holds the exact number, column C its “picture” — the report is both precise and easy to scan.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Manager | Sales, mln UZS | Chart | |
| 2 | Aziz | 42 | ||
| 3 | Dilnoza | 58 | ||
| 4 | Javohir | 31 | ||
| 5 | Malika | 66 | ||
| 6 | Sardor | 24 | ||
| 7 |
Pro level: take control of the scale
The automatic scale is not always right. Take plan completion: if someone hit 110%, Excel uses that as the maximum, and the bar of an employee at exactly 100% is no longer full. Yet your manager reads “100% = full cell”.
Fix: in Edit Rule... set Minimum to type Number = 0 and Maximum to type Number = 1. Now 100% and above is a full bar, 50% is half a cell.
- Don’t use Lowest Value as the minimum: the smallest value gets a zero-length bar and differences are exaggerated (24 vs 31 looks dramatic).
- Negative bar color and axis position live under Negative Value and Axis....
- To put several columns on one scale, include them in a single rule — separate rules each take their own maximum, and the columns can’t be compared.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Manager | Plan | Actual | Completed | |
| 2 | Aziz | 50 | 42 | 84% | |
| 3 | Dilnoza | 55 | 58 | 105% | |
| 4 | Javohir | 40 | 31 | 78% | |
| 5 | Malika | 60 | 66 | 110% | |
| 6 | Sardor | 30 | 24 | 80% | |
| 7 |
Try it in the simulator
Build “data bars” without conditional formatting: type =ПОВТОР("■";ОКРУГЛ(B2/10;0)) in C2 and fill it down to C6. Then change B5 to 90 and watch Malika’s bar grow.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Manager | Sales, mln UZS | Chart | |||||||||||||||||||||
| 2 | Aziz | 42 | ||||||||||||||||||||||
| 3 | Dilnoza | 58 | ||||||||||||||||||||||
| 4 | Javohir | 31 | ||||||||||||||||||||||
| 5 | Malika | 66 | ||||||||||||||||||||||
| 6 | Sardor | 24 | ||||||||||||||||||||||
| 7 | ||||||||||||||||||||||||
| 8 | ||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 |
Has ExcelLab been useful?
Support the project and help us release new lessons and exercises.