Skip to content

Show size with data bars, color scales and icon sets

Conditional formatting8 min

Builds on Highlight cells with conditional formatting.

A regional manager in Utrecht gets a weekly table of sales, waste and customer ratings for her eleven bakeries. Bars, colors and icons inside the cells show her the strongest and weakest shops before she reads a number.

How it works

Data bars, color scales and icon sets draw each value instead of testing it. All three are on the Conditional Formatting menu:

  • Data Bars put a bar in each cell, longer for larger values, so a column reads like a bar chart.
  • Color Scales shade each cell by where its value sits between the lowest and the highest. A three-color scale puts its middle color on the middle value, the 50th percentile.
  • Icon Sets sort the values into bands and give each band an icon, such as a green, yellow or red light.

In the Color Scales gallery, the first color in a scale's name goes to the highest values: Green - Yellow - Red makes the biggest numbers green. When low is good, as with costs or days late, pick Red - Yellow - Green.

Example

A courier's eight routes take between 1.8 and 6.5 days on average. With Red - Yellow - Green on those cells, the fastest route is green, the slowest red, and the routes near the middle yellow:

A color scale places each value between the lowest and the highest. The middle color sits on the middle value, 3.35 days, halfway between the 4th and 5th routes, and each cell blends toward its end of the scale.

Icons for a fixed target

An icon set's default bands cut the distance from the lowest value to the highest into thirds, and Percent in its rule means a share of that distance. With store ratings from 61% to 97%, the green band starts at 85.1%, so a store on 84% gets yellow even though the target is 80%:

RatingDefault bandsNumber: 0.8 and 0.7
97%greengreen
84%yellowgreen
80%yellowgreen
72%redyellow
61%redred
Default bands follow the spread of the data, so a store above the 80% target can still get yellow. Number thresholds tie the icons to the target.

To use the target, edit the rule in Manage Rules, set each Type to Number and type the limits. The cells hold fractions, so 80% is 0.8 and 70% is 0.7.

Common mistakes

  • Green - Yellow - Red on costs or delays, which turns the worst rows green.
  • Icons left on their default bands, which follow the data and ignore your target. Set Number thresholds.
  • A total inside the range. It takes the longest bar or the end color, and the rest shrink. Leave totals out.
  • Bars, a scale and icons on the same cells, competing with each other. One visual per column is enough.

In short

  • Bars show size, scales show where a value sits between the lowest and the highest, and icons show bands.
  • The first color in a scale's name goes to the highest values.
  • For a target, set icon thresholds to Number: Percent means a share of the range.

Practice

4 exercises · free, no account needed

Start practicing
  1. Not started

    1. Add data bars to the units shipped

    Conditional formatting · easy

  2. Not started

    2. Color the suppliers by days late

    Conditional formatting · medium

  3. Not started

    3. Mark each rep against the target

    Conditional formatting · hard

  4. Not started

    4. A color scale when everyone did well

    Quiz · easy