Excel tutorial
/

Data analysis

Intermediate

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.

Книга1 - Excel
—☐✕
fx
ABCD
1ManagerSales, mln UZS
2Aziz42
3Dilnoza58
4Javohir31
5Malika66
6Sardor24
7
Готово
Malika has the longest bar (66 mln), Sardor the shortest (24 mln). Bar length is proportional to the value

Adding data bars — 4 steps

1

Select only the number cells — no header and no Total row. Here that is B2:B6.

Книга1 - Excel
—☐✕
B2fx42
ABCD
1ManagerSales, mln UZS
2Aziz421
3Dilnoza58
4Javohir31
5Malika66
6Sardor24
7
ГотовоСреднее: 44,2Количество: 5Сумма: 221

2

On the Главная tab, click Условное форматирование and point to Data Bars.

Книга1 - Excel
—☐✕
ФайлГлавнаяВставкаРазметка страницыФормулыДанныеРецензированиеВидСправка
Вставить
Буфер обмена
Calibri ▾11 ▾
Шрифт
Выравнивание
Общий ▾
Число
Условное форматированиеФорматировать как таблицуСтили ячеек
Стили
ВставитьУдалитьФормат
Ячейки
АвтосуммаСортировка и фильтрНайти и выделить
Редактирование
B2fx42
ABCD
1ManagerSales, mln UZS
2Aziz42
3Dilnoza58
4Javohir31
5Malika66
6Sardor24
7
ГотовоСреднее: 44,2Количество: 5Сумма: 221

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.

Книга1 - Excel
—☐✕
ФайлГлавнаяВставкаРазметка страницыФормулыДанныеРецензированиеВидСправка
Вставить
Буфер обмена
Calibri ▾11 ▾
Шрифт
Выравнивание
Общий ▾
Число
Условное форматированиеФорматировать как таблицуСтили ячеек
Стили
ВставитьУдалитьФормат
Ячейки
АвтосуммаСортировка и фильтрНайти и выделить
Редактирование
B2fx42
ABCD
1ManagerSales, mln UZS
2Aziz42
3Dilnoza58
4Javohir31
5Malika66
6Sardor24
7
ГотовоСреднее: 44,2Количество: 5Сумма: 221
The Data Bars submenu: hovering shows a live preview

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.
Книга1 - Excel
—☐✕
B7fx=СУММ(B2:B6)
ABCD
1ManagerSales, mln UZS
2Aziz42
3Dilnoza58
4Javohir31
5Malika66
6Sardor24
7Total2211
8
ГотовоСреднее: 73,6667Количество: 6Сумма: 442
The total (221 mln) got into the data bars: the differences between managers are almost gone

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.

Книга1 - Excel
—☐✕
C2fx=B2
ABCD
1ManagerSales, mln UZSChart
2Aziz4242
3Dilnoza5858
4Javohir3131
5Malika6666
6Sardor2424
7
ГотовоСреднее: 44,2Количество: 5Сумма: 221

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.

Книга1 - Excel
—☐✕
C2fx=B2
ABCD
1ManagerSales, mln UZSChart
2Aziz4242
3Dilnoza5858
4Javohir3131
5Malika6666
6Sardor2424
7
ГотовоСреднее: 44,2Количество: 5Сумма: 221

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.

Книга1 - Excel
—☐✕
fx
ABCD
1ManagerSales, mln UZSChart
2Aziz42
3Dilnoza58
4Javohir31
5Malika66
6Sardor24
7
Готово
Column C still holds formulas, but Show Bar Only leaves just the bars visible

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.
Книга1 - Excel
—☐✕
D3fx=C3/B3
ABCDE
1ManagerPlanActualCompleted
2Aziz504284%
3Dilnoza5558105%
4Javohir403178%
5Malika6066110%
6Sardor302480%
7
Готово
Minimum = 0, Maximum = 1 (Number): 105% and 110% are full bars, 78% fills 78% of the cell

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.

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1ManagerSales, mln UZSChart
2Aziz42
3Dilnoza58
4Javohir31
5Malika66
6Sardor24
7
8
9
10
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

49 / 154