Sub topic 6
Classifying values with icon sets
An icon set puts a small symbol inside each cell, such as an arrow, a traffic light, or a star. The symbol depends on which band the cell's value falls into. Data bars and color scales show a continuous scale. Icon sets sort values into 3, 4, or 5 discrete classes, so they suit "good, watch, bad" readings.
This chapter assumes you can apply a rule from the Home tab, you know what the Applies to range is, and you can write a formula with absolute references such as $H$1. If any of these is unfamiliar, review the earlier chapters first.
Applying a built-in icon set
- Select the cells that hold the numbers, for example
D2:D50. - Choose Home > Conditional Formatting > Icon Sets.
- Pick a set from one of four groups.
| Group | Examples | Typical use |
|---|---|---|
| Directional | Arrows, triangles | Change up, flat, or down |
| Shapes | Traffic lights, red-to-black circles | Status or severity |
| Indicators | Check, exclamation, and cross symbols; flags | Pass, warn, fail |
| Ratings | Stars, quarters, bars | Scores from 1 to 5 |
Each set has 3, 4, or 5 icons. Excel assigns the icons using default thresholds, which you can change.
How Excel decides which icon to show
Excel tests each cell against the thresholds from the top icon down. The first threshold the value satisfies decides the icon. The lowest icon has no threshold of its own and takes every value that failed the tests above it.
The default thresholds depend on the set size, and the default type is Percent.
| Set size | Default thresholds |
|---|---|
| 3 icons | 67% and 33% |
| 4 icons | 75%, 50%, and 25% |
| 5 icons | 80%, 60%, 40%, and 20% |
Percent here is not a share of the cell's own value. Excel works out the threshold from the smallest and largest values in the Applies to range:
threshold = minimum + (maximum - minimum) x percent / 100If the values run from 0 to 200, the 67% threshold is 134. A value of 140 gets the top icon and 100 gets the middle icon.
Editing the thresholds
Open Conditional Formatting > Manage Rules, select the icon set rule, and choose Edit Rule. Under Format Style: Icon Sets you can see one row per icon. Each row has a comparison (>= or >), a Value, and a Type.
The four threshold types
| Type | Meaning | Use when |
|---|---|---|
| Number | A fixed value you type | The business defines the cutoff, such as 90% of target |
| Percent | A position between the range's minimum and maximum | You want relative bands and the range has no extreme outliers |
| Percentile | A rank position, like the `PERCENTILE` function | You want roughly equal numbers of cells in each band |
| Formula | A formula that returns a number, starting with `=` | The cutoff lives in a cell, so users can change it |
Percent is the default, but Number is usually the better choice for real work. A single outlier stretches the minimum-to-maximum span, and then most cells fall into the same band.
Worked example: target attainment
Column D holds attainment as a ratio of actual to target, formatted as a percentage. You want a green check at 100% or more, an amber warning from 80% up to 100%, and a red cross below 80%.
- Select
D2:D50. - Apply Indicators > 3 Symbols (Circled).
- Open Manage Rules > Edit Rule.
- For the top icon, set the operator to
>=, the Type to Number, and the Value to1. - For the middle icon, set
>=, Number, and0.8. - Click OK.
The cells store 1 for 100% and 0.8 for 80%, so you type the underlying numbers, not the displayed percentages.
Keeping thresholds in cells
If managers want to change the cutoffs without opening the rule, store them in cells. Put 1 in H1 and 0.8 in H2, then choose the Formula type for the two thresholds:
=$H$1=$H$2Use absolute references. A relative reference in a threshold can shift when you copy or move the rule.
Reverse order, icon only, and hidden icons
- Reverse Icon Order swaps the icons. Use it when a low number is good, such as days to resolve a ticket or error counts.
- Show Icon Only hides the number and leaves the symbol. It works well in narrow status columns.
- Each icon has a dropdown that includes No Cell Icon. Choose it for the bands you do not care about, so that only the problem cells show a symbol.
Driving icons from a different calculation
An icon set looks only at the value in each cell it covers. You cannot tell it to compare column C against column B. The usual fix is a helper column that holds a number, with the icon set applied to that column.
Suppose B holds last month's sales and C holds this month's. In D2, fill down:
=SIGN(C2-B2)SIGN returns 1, 0, or -1. Apply the 3 Arrows (Colored) set to column D. Set the top threshold to >= Number 1, and the middle threshold to >= Number 0. A rise gets the green up arrow, no change gets the yellow sideways arrow, and a fall gets the red down arrow. Turn on Show Icon Only and narrow the column.
To classify percentage change with a flat zone of plus or minus 5%, use this formula instead:
=IF(B2=0,"",C2/B2-1)Set the thresholds to >= Number 0.05 and >= Number -0.05. The "" result is text, and icon sets skip text cells, so rows with no baseline get no icon. This also avoids a #DIV/0! error.
Common errors
- All icons look the same. Percent thresholds on a range with one huge outlier. Switch the type to Number or Percentile.
- The boundary value gets the wrong icon. Check
>=versus>. A value of exactly 0.8 lands in the amber band with>=and in the red band with>. - Icons seem to ignore the percentage you see. You typed
80where the cell stores0.8. Compare against the stored value. - Several columns share one scale. Percent and Percentile thresholds are calculated over the entire Applies to range. Apply a separate rule to each column when the columns use different units.
- A threshold stops working after a copy. A Formula threshold used a relative reference. Rewrite it with
$. - Error values or text cells have no icon. Icon sets only classify numbers. Wrap the source formula to return a number, or accept the gap.
- The icon does not sit next to the number. Icons align left while numbers align right. Center the text, or use Show Icon Only.
Thresholds must run from highest to lowest. If you enter a lower value on a higher icon, Excel warns you about the order, and the result is not what you intended.
Choosing icons well
Use three classes whenever you can. Readers separate three states instantly, but they struggle to tell apart five arrows at a glance. Reserve 4-icon and 5-icon sets for scores that are already on a 1 to 5 scale, where the Ratings group fits naturally.
Decide the thresholds from a business rule, then record them. A cell labelled "Thresholds" next to the table, linked through Formula-type thresholds, documents the rule and keeps it editable. An icon set with unexplained Percent defaults looks authoritative but often encodes nothing.
Exercise
Column F holds days to resolve a support ticket. You want a green icon for 2 days or fewer, amber for 3 to 5 days, and red for more than 5 days. Which icon set order, threshold type, and values do you use?
Show answer
Use a 3-icon set such as the traffic lights, with the Number type. Because low numbers are good, either select Reverse Icon Order or arrange the thresholds so the green icon is at the low end. With the default order (green on top), reversing it makes the top threshold apply to the red icon: red when >= 6 (or > 5), amber when >= 3, and green for everything else. Number is better than Percent because the cutoffs come from a service rule, not from the spread of the data.
Exercise
You apply a 3-icon Percent rule to B2:B20. Most values are between 40 and 60, but one value is 1,000. Nearly every cell gets the lowest icon. Why, and how do you fix it?
Show answer
Percent thresholds are measured between the range's minimum and maximum. The 1,000 outlier stretches the span, so the 33% threshold is about 360 and almost every other value falls below it. Fix it by switching to Number thresholds that reflect real cutoffs, or by using Percentile thresholds, which depend on rank and not on the maximum.
Exercise
Column C holds this quarter's revenue and column B holds last quarter's. Describe how to show a green up arrow, a yellow sideways arrow, or a red down arrow in column D without changing C.
Show answer
In D2 enter =SIGN(C2-B2) and fill down. Apply the 3 Arrows (Colored) icon set to column D. Edit the rule so the top threshold is >= Number 1 and the middle threshold is >= Number 0. Optionally turn on Show Icon Only.