Sub topic 5
Showing distribution with color scales
This chapter assumes you can select ranges, apply a basic fill color, and open the Home tab's Conditional Formatting menu. You should also know how the Applies to range limits a rule, which an earlier chapter covered.
What a color scale does
A color scale shades each cell in a range along a gradient. Cell color depends on where the cell's value sits between the lowest and highest values. Data bars show magnitude with a bar length. Color scales show it with color, so they suit grids where you want to see clusters, hot spots and gaps at a glance. Typical uses are monthly sales by region, survey scores and temperature tables.
To apply one, select the numbers and choose Home > Conditional Formatting > Color Scales. Then pick a preset. Each preset thumbnail shows its colors from top to bottom of the range.
Two-color and three-color scales
A two-color scale blends from one color at the minimum to another at the maximum. A three-color scale adds a midpoint color. This lets you show a value that separates "good" from "bad", such as a target.
| Type | Points | Best for |
|---|---|---|
| Two-color | Minimum, maximum | Plain low-to-high magnitude, such as white to green |
| Three-color | Minimum, midpoint, maximum | Data with a meaningful center, such as green-yellow-red |
The built-in presets use fixed settings. The midpoint of a three-color preset is the 50th percentile, which is the median. It is not the average or the midway number between the extremes.
Customizing the scale
Choose Conditional Formatting > Color Scales > More Rules. For each point (Minimum, Midpoint, Maximum), you set a Type, a Value and a Color.
- Lowest Value / Highest Value: uses the actual minimum or maximum in the range.
- Number: a fixed value that you type.
- Percent: a position between the minimum and maximum, so 50 is halfway between them.
- Percentile: a position in the ranked data, so 50 is the median.
- Formula: a value from a formula, or from a cell you reference.
Using the Formula type lets the center follow your data or a target cell. For example, if the target sits in $F$1, enter this as the midpoint Value:
=$F$1Values above the target then shade toward the maximum color. Values below it shade toward the minimum color. Use an absolute reference here, because the scale needs one fixed point and not one that shifts per cell.
Common errors
- Outliers wash out the scale. With Lowest Value and Highest Value, one extreme number stretches the gradient, and every other cell looks nearly the same color. Set the Minimum to the 5th percentile and the Maximum to the 95th, or use fixed numbers. Values beyond those points take the end color.
- Mixing unrelated columns in one range. A scale compares every cell in the Applies to range against every other. If you select columns for "Units" and "Revenue" together, the revenue column becomes all dark and the unit column all light. Apply the rule to each column separately.
- Expecting text or blanks to be shaded. Color scales ignore text. Cells that look numeric but are stored as text, often after an import, stay unshaded. Convert them to numbers first.
- Rainbow palettes. Red-green scales are hard to read for people with color-vision deficiency. Prefer a single hue that varies in lightness, such as white to blue.
- Stacking scales on one range. Only one color scale applies to a given cell. A second one added to the same range will override the first.
Reviewing the rule
Open Conditional Formatting > Manage Rules to see the scale listed with its Applies to range. Use Edit Rule to change the endpoints. If the scale covers a range that grew since you built it, widen the Applies to reference there.
Exercise
A column of delivery times holds values from 1 to 9 days, plus one entry of 60 days. A default two-color scale makes the other values look almost identical. Which change fixes this, and why?
Show answer
Edit the rule so the Maximum uses the Percentile type at 95 instead of Highest Value. The 60-day outlier no longer sets the top of the gradient. Values at or above the 95th percentile take the end color, so the 1-to-9 day values spread across the full color range.