A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Use a custom conditional formatting rule based on a formula and apply it to the score range.
Assume the grading table (score targets) is in fixed cells, for example:
- Score 1 threshold in $B$24
- Score 2 threshold in $C$24
- Score 3 threshold in $D$24
- Score 4 threshold in $E$24
- Score 5 threshold in $F$24 and the data to format is in row 5, columns B:F.
For each color band, create a separate rule:
- Select the data cells to format (for example, B5:F18).
- On Home > Styles > Conditional Formatting > New Rule.
- Choose Use a formula to determine which cells to format (or Rule Type: Formula in Excel for the web).
- Enter a formula that tests the value in the first cell of the selection against the grading table, such as:
- Red (score 1):
=B5<$B$24 - Orange (score 2):
=AND(B5>=$B$24,B5<$C$24) - Yellow (score 3):
=AND(B5>=$C$24,B5<$D$24) - Light green (score 4):
=AND(B5>=$D$24,B5<$E$24) - Dark green (score 5):
=B5>=$E$24
- Red (score 1):
- Click Format, choose the fill color that corresponds to that score band, and click OK.
- Repeat steps 2–5 for each band, using the same Applies to range (B5:F18) and adjusting only the formula and color.
- In Manage Rules, ensure the rules are listed in the correct order (from most specific to least, or with Stop If True where needed).
This uses formulas so the data table above always picks up the thresholds from the grading table below; changing the grading table automatically updates the colors.
References: