Sub topic 6
Classifying Values with Icon Sets
This chapter assumes you can select ranges, enter numbers, and apply a basic rule from the Home tab. Icon sets add a small symbol to each cell and choose the symbol by comparing the cell's value with thresholds. They sort values into two to five classes, such as good, warning and bad.
Applying an icon set
- Select the numeric cells, for example
C2:C50. - Choose Home > Conditional Formatting > Icon Sets.
- Pick a style from the groups: Directional (arrows), Shapes (traffic lights), Indicators (check marks, flags) or Ratings (stars, bars).
Excel applies default thresholds right away. In a three-icon set, the default rule is:
| Icon | Default condition |
|---|---|
| First (for example green) | Value is at or above 67 percent |
| Second (yellow) | Value is at or above 33 percent but below 67 percent |
| Third (red) | Value is below 33 percent |
The percentages are positions between the smallest and largest value in the range. They are not percentages of the values themselves. If the range runs from 0 to 200, the 67 percent boundary is 134.
Customizing the thresholds
Defaults rarely match real targets. To change them, go to Conditional Formatting > Manage Rules, select the icon set rule, and choose Edit Rule.
For each icon you set an operator (>= or >), a Value, and a Type. The types are:
- Number: a fixed value, such as 90.
- Percent: a position between the minimum and maximum of the range.
- Percentile: a rank within the data, so 80 means 80 percent of the values fall below it.
- Formula: a formula or cell reference, such as
=$H$1.
Other options in the dialog:
- Reverse Icon Order: use it when a low value is good, as with defect counts.
- Show Icon Only: hides the number and leaves just the symbol.
Excel tests the icons from the top down. The first icon's threshold must be the highest, and the first condition that is true wins.
Worked example: score targets
Suppose column C holds test scores. You want a green icon at 90 or above, yellow from 70 to 89, and red below 70.
- Apply the 3 Traffic Lights set to
C2:C50. - Edit the rule. Set the first icon to
>=90 with type Number. - Set the second icon to
>=70 with type Number. - Leave the third icon alone. It covers everything below 70.
To keep the targets in worksheet cells, set the type to Formula and enter absolute references:
=$H$1Put 90 in H1 and 70 in H2, and use =$H$2 for the second icon. When the targets change, the icons update without editing the rule. The $ signs keep the reference on one cell for the whole range.
Common errors
- Percent used when Number was intended. The icons look wrong because the boundaries move whenever the minimum or maximum changes. Switch to Number for fixed targets.
- Text that looks like numbers. Cells with left-aligned text values get no icon. Convert them to real numbers.
- Thresholds out of order. If the middle value is higher than the top value, the icons behave unpredictably. Keep the values descending.
- Boundary values. With
>=90, a score of exactly 90 gets the green icon. Change the operator to>if that is not what you want. - Blank cells. A blank cell can be treated as zero and get the lowest icon. Limit the range, or add a formula-based rule that overrides it.
Exercise
A column of defect counts should show a green icon for 5 or fewer defects, yellow for 6 to 15, and red above 15. Which settings produce that with a three-icon set, and what is the simplest way to avoid reversing the order?
Show answer
Use a set where the first icon is green and apply Reverse Icon Order only if the set colors must flip. A simpler route is to keep the default order and set the thresholds as: first icon (green) when value is less than or equal to... which Excel does not offer. So use Reverse Icon Order with the traffic-light set, so the red icon is first. Set the first icon to >= 16 (Number), the second to >= 6 (Number), and the third covers 5 or fewer. Check that 5 shows green and 16 shows red.