Sub topic 9
Editing, Copying, and Deleting Conditional Formatting Rules
This chapter assumes you can select ranges in Google Sheets, enter simple formulas, and open the Conditional format rules panel. You will work with existing rules rather than create a complete sheet from scratch.
Conditional formatting rules are stored separately from the values in your cells. A rule has three main parts:
- The range it applies to.
- The condition it checks.
- The format it applies, such as a background color or bold text.
You can change any of these parts without changing the data in the sheet.
Open and inspect the rule list
- Select a cell in the sheet.
- Open Format > Conditional formatting.
- Look at the Conditional format rules panel on the right.
The panel lists rules for the current sheet. Each rule shows its target range, condition, and formatting preview. Select a rule to expand it.
If you select a formatted cell before opening the panel, Sheets may show the rule that affects that cell first. You can still inspect other rules in the list.
A rule may apply to one range, such as A2:F100, or to several ranges. If several ranges are listed, the same condition and style apply to all of them.
Edit a rule safely
Expand a rule and change the setting you need:
- Apply to range changes which cells the rule can format.
- The condition changes what the rule tests.
- The formatting style changes the appearance.
- Done saves the change.
For example, suppose a rule uses this custom formula:
=$C2="Done"If the rule applies to A2:F100, it formats a whole row when the value in column C is Done. If you change the range to A2:E100, column F will no longer receive the formatting. The formula still refers to column C because $C anchors the column while the row number remains relative.
When editing a rule, check the first row of the range. A formula written for row 2 may give incorrect results if the range begins at row 3.
> callout tip > Edit one part of a rule at a time. After each change, check a cell that should match and a cell that should not match. This makes reference errors easier to find.
Copy a rule to another range
Google Sheets does not provide a separate “duplicate rule” button in the conditional formatting panel. A practical method is to copy the formatted cells and paste only the formatting:
- Select cells containing the rule.
- Copy them.
- Select the destination range.
- Open Edit > Paste special > Conditional formatting only.
This copies the conditional formatting rule without copying values or ordinary formatting. Review the resulting rule because cell references may adjust according to the new location.
For example, a rule applied to A2:F100 with =$C2="Done" may become a rule for the destination range whose relative row references start at that destination’s first row. This is useful when the same table structure appears in several places.
If the destination has different columns, inspect anchored references carefully. A reference such as $C2 keeps column C fixed, while C2 may shift when copied.
Delete a rule
To remove one rule:
- Open the Conditional format rules panel.
- Expand the rule.
- Click the trash-can icon.
- Confirm that the formatting disappears from the intended range.
Deleting a rule does not delete cell values, formulas, or ordinary formatting. It only removes the conditional formatting behavior.
To remove all conditional formatting from a selected range, use the panel to delete each rule that covers that range. A rule can cover several ranges, so deleting it may also remove formatting in other locations.
Rule order and maintenance
When several rules apply to the same cell, their order matters. In the rules panel, drag rules to reorder them. A rule higher in the list has higher priority when competing formats affect the same property.
Keep rules understandable by using narrow ranges where possible. Remove old rules after a table changes shape. Unused rules can make later troubleshooting difficult, especially when a cell appears to have a color that no current condition seems to explain.
| Maintenance task | What to check |
|---|---|
| Edit a rule | Range, condition, references, and style |
| Copy a rule | Destination range and shifted references |
| Delete a rule | Every range covered by that rule |
| Reorder rules | Which rule should win when formats conflict |
Verify the result
After editing, copying, or deleting a rule, test the boundary cases:
- A cell that should meet the condition.
- A cell that should fail the condition.
- The first and last rows in the applied range.
- A blank cell, if blanks are possible.
- A cell affected by another rule.
For a copied custom formula, temporarily enter a known test value such as Done in the referenced status column. Then undo the test value after checking the result.
Exercise
You copied a rule based on =$C2="Done" to a table that starts on row 20. Which part should you inspect first if the copied rule formats the wrong rows?
Show answer
Inspect the relative row reference and confirm that the formula aligns with the first row of the new applied range. For a range beginning at row 20, the formula usually needs to start with =$C20="Done".