Sub topic 11
Reviewing and editing rules in the Rules Manager
This chapter assumes you can enter data, select ranges, write simple formulas, and apply a basic built-in conditional formatting rule from the Home tab. You should also know what the Applies to range does. Here you will use the Conditional Formatting Rules Manager to see every rule in a workbook, change it, and fix its scope.
Opening the Rules Manager
The Rules Manager is the one place that lists all conditional formatting rules. Open it from Home > Conditional Formatting > Manage Rules.
At the top is a dropdown labeled Show formatting rules for. It starts on Current Selection, which lists only rules that touch the cells you selected. Change it to This Worksheet to see every rule on the sheet. Beginners often miss this step and conclude that a rule has vanished, when it is only filtered out of the list.
Reading the rules list
Each row in the list shows four things.
| Column | What it tells you |
|---|---|
| Rule (applied in the order shown) | The rule type or its condition, such as a formula |
| Format | A preview of the fill, font, or border the rule applies |
| Applies to | The range the rule evaluates |
| Stop If True | A checkbox that halts lower-priority rules for matching cells |
Rules are listed from highest to lowest priority. Order matters when two rules format the same cells, and a later chapter covers it in detail. For now, notice that the list order is the evaluation order.
Editing a rule
Select a rule and click Edit Rule. The dialog is the same one you used to create it. You can change the rule type, the formula, and the format.
Suppose a rule uses the formula =$C2>1000 and you want a higher threshold. Change it to the following.
=$C2>5000Click OK to return to the manager. The rule keeps its Applies to range. The range and the formula are separate settings, and a formula is always evaluated relative to the top-left cell of the range.
Fixing the Applies to range
The most common repair is a wrong scope. In the Applies to box, type a new range or drag across cells on the sheet. To cover a table from row 2 to row 50, enter:
=$A$2:$E$50Keep the formula's references aligned with the first cell of this range. If the range starts at A2, write the formula as if A2 is the active cell. If the range starts at A5 but the formula refers to row 2, the rule will check the wrong rows.
Other actions in the manager
- New Rule adds a rule without leaving the manager.
- Duplicate Rule copies the selected rule. Use it to make a variation, then edit the copy.
- Delete Rule removes the selected rule only. Other rules on the same cells stay in place.
- The up and down arrows change priority.
- Apply saves your changes and keeps the dialog open, so you can check the sheet before closing.
Common errors
- Editing the wrong rule. Several rules can look alike. Check the Applies to column before you edit.
- Rules that split after a copy and paste. Pasting cells can create several rules with fragments of the original range. Review the list and merge them by editing one rule's range.
- Leftover rules. Deleted rows and moved data leave behind rules with odd ranges. Scan the list for ranges you do not recognize.
Exercise
You open the Rules Manager and see no rules, but you know a highlight rule exists on the sheet. What is the likely cause, and how do you fix it?
Show answer
The dropdown is probably set to Current Selection, and the selected cells have no rules. Change Show formatting rules for to This Worksheet to list every rule on the sheet.
Exercise
A rule with the formula =$C2>1000 has Applies to set to $A$5:$E$50. Rows look highlighted one row off from what you expect. What is wrong, and what is the fix?
Show answer
The formula is written for row 2, but the range starts at row 5. Excel evaluates the formula relative to A5, so each row is compared with the wrong data. Change the formula to =$C5>1000.