Data Bars, Color Scales and Icon Sets in Excel
By ExcelReady TeamUpdated 5 min read
The short answer
To add data bars in Excel, select the numbers, go to Home > Conditional Formatting > Data Bars and pick a colour. Each cell gets a bar whose length shows its size compared with the others. Color Scales shade cells from low to high, and Icon Sets add arrows or traffic lights. Manage Rules sets your own thresholds.
Key takeaways
- Data bars, color scales and icon sets are conditional formatting rules on the Home tab.
- Select only the values, not the total row, or the total's bar dwarfs everything else.
- With positive numbers, bar length is roughly the value divided by the largest value.
- Icon sets use percent thresholds by default; switch them to Number for real targets like 90.
- Show Bar Only and Show Icon Only hide the numbers when you only want the picture.
On this page+
Data bars in Excel turn a column of numbers into small bar charts inside the cells, so the biggest and smallest values jump out at a glance. Color scales and icon sets do the same job with shading and symbols. All three are conditional formatting rules: they update when the numbers change. This guide shows how to add each one and how to set it up so it tells the truth.
Data bars, color scales and icon sets: what's the difference?#
All three live under Home > Conditional Formatting, and all three compare each cell with the rest of the selection:
| Type | What it shows | Best for |
|---|---|---|
| Data Bars | A bar in each cell; longer means bigger | Comparing amounts, like sales by rep |
| Color Scales | A fill colour from low to high | Spotting patterns in a big grid, like a heat map |
| Icon Sets | Arrows, flags or traffic lights by threshold | Status at a glance, like on target or not |
The examples use this list in A1:C9:
| A | B | C | |
|---|---|---|---|
| 1 | Rep | Region | Sales |
| 2 | Ana | East | 4200 |
| 3 | Ben | West | 1800 |
| 4 | Cara | East | 6100 |
| 5 | Dev | South | 950 |
| 6 | Eli | North | 5300 |
| 7 | Femi | South | 2900 |
| 8 | Gus | West | 7400 |
| 9 | Hana | North | 4800 |
For highlight rules such as "greater than 5,000", see the beginner's guide to conditional formatting instead.
How to add data bars in Excel#
- Select the numbers only: C2:C9. Leave out the header and any total row.
- Go to Home > Conditional Formatting > Data Bars.
- Hover over the options to preview them, then click one under Gradient Fill or Solid Fill.
Gus, at 7,400, gets the longest bar. Dev, at 950, gets a short one. When all the values are positive, each bar's length is roughly the value divided by the largest value, so Ana's bar is about 4,200 / 7,400 = 57% of Gus's. The steps are the same in Excel for Mac.
Never include the total. If C10 holds the total of 33,450 and you select C2:C10, the total gets a full bar and every rep's bar shrinks to a sliver. Select only the values you want to compare.
Change how data bars look#
Go to Home > Conditional Formatting > Manage Rules, pick the data bar rule and click Edit Rule. Useful settings:
- Show Bar Only hides the numbers and leaves just the bars.
- Minimum and Maximum set where a bar starts and ends. Choose Number and type
0and10000to compare against a fixed scale, such as a target. - Fill and Border switch between gradient and solid, and set the colour.
- Negative Value and Axis sets the colour for negative bars and where the axis sits.
How to add a color scale#
A color scale shades every cell by where it sits between the lowest and highest values.
- Select C2:C9.
- Go to Home > Conditional Formatting > Color Scales.
- Pick a two-colour or three-colour scale.
On a green-yellow-red scale, Gus's 7,400 turns green, Dev's 950 turns red, and the rest get shades in between. On a three-colour scale, the middle colour sits at the 50th percentile by default: half the values are above it.
Choose colours that match the meaning. For sales, high is good, so high should be green. For costs or late days, high is bad, so pick the scale with red at the top. To swap colours on an existing rule, edit it and change the Minimum and Maximum colours. Color scales work best on big grids, such as sales by month and region, where they act as a heat map.
How to add icon sets and set your own thresholds#
Icon sets add a symbol to each cell based on thresholds.
- Select C2:C9.
- Go to Home > Conditional Formatting > Icon Sets and pick a set, such as 3 Traffic Lights.
By default, the thresholds are Percent values of 67 and 33. Percent here means a position between the lowest and highest value, not a share of the total. With a low of 950 and a high of 7,400, the green cut-off is about 5,272 and the yellow cut-off about 3,079. So Gus, Cara and Eli get green, Hana and Ana get yellow, and Femi, Ben and Dev get red.
Usually you want real targets instead. Edit the rule and, for each icon, change Type to Number:
| Icon | Rule | Value |
|---|---|---|
| Green | when value is >= | 5000 |
| Yellow | when < 5000 and >= | 3000 |
| Red | when < 3000 |
Now green means "sold at least 5,000". Tick Show Icon Only to hide the numbers, or click Reverse Icon Order when low values are the good ones.
Sort and filter by colour or icon#
Once the formatting is on, you can sort or filter by it. Turn on the filter buttons with Ctrl+Shift+L (Mac: ⌘⇧F), click the arrow on the Sales column, and choose Filter by Color to show, say, only red icons or one fill colour. In the Sort dialog, set Sort On to Cell Color or Conditional Formatting Icon to bring one group to the top. The guides to filtering data and sorting data cover these menus in full.
Common mistakes with data bars and color scales#
- A total in the range. It stretches the scale. Remove it from Applies to in Manage Rules.
- Text that looks like numbers. Cells holding "4200" as text get no bar. Convert them to numbers.
- Bars that all look the same. The minimum may be set to the lowest value or a high number. Set Minimum to Number 0.
- Too many rules. A data bar, a color scale and icons on the same cells is hard to read. Use one.
- Colours with no key. Readers may not know what green means. Add a short note above the table.
Formula alternatives and next steps#
You can also draw bars with a formula. =REPT("|",C2/500) repeats a character once per 500 in sales, which works anywhere, even in exported text. See in-cell bar charts with REPT. Data bars also look great beside a summary table built with formulas, as in summarizing data without a pivot table.
Practise it#
Visual formatting is quick to apply, and tests check that you pick the right range and rule. Practise conditional formatting in a live spreadsheet: highlight values over a limit, duplicates, the top 3 and whole rows, with instant checks. Try the bar-length exercise on this page first.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
A data bar's length is roughly the value divided by the biggest value. In D2, work out how long Ana's bar is compared with the longest one: divide C2 by the largest sales value in C2:C9.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Bar length | ||||
| 2 | |||||
| 3 | |||||
| 4 | |||||
| 5 | |||||
| 6 | |||||
| 7 | |||||
| 8 | |||||
| 9 | |||||
| 10 | |||||
| 11 | |||||
| 12 |
Tip: Divide C2 by MAX of the whole sales column.
Practise this in a lesson
Frequently asked questions
How do I add data bars in Excel?
Select the cells with numbers, go to Home > Conditional Formatting > Data Bars and choose a gradient or solid fill. The bars appear at once and update when the numbers change.
How do I show data bars without the numbers?
Go to Home > Conditional Formatting > Manage Rules, select the data bar rule and click Edit Rule. Tick Show Bar Only and click OK.
Why are all my data bars almost the same length?
The rule may have a minimum that isn't zero, or the range may include a large total. Edit the rule and set Minimum to Number 0, and remove the total row from the Applies to range.
How do I change icon set thresholds in Excel?
Edit the icon set rule, change Type from Percent to Number, and type your own values, such as 90 for a green icon and 70 for yellow. Excel then compares the real values with those numbers.
How do I reverse a color scale so high values are red?
Edit the color scale rule and swap the colours set for Minimum and Maximum, or pick the version of the scale with the colours the other way round from the Color Scales menu.