Conditional Formatting allows you to change the color and font emphasis in cells based on conditions you set, so you can identify key points at a glance.
Create a rule
To add a rule in your spreadsheet:
- Select the cells you want to format. These cells can be neighboring or detached by holding down the Ctrl/Cmd key as you select individual cells.
- In the Edit toolbar, click Conditions.
- Select Add New Rule from the dropdown menu to open the Conditional Formatting panel.
Set rule conditions
To set conditions for your rule:
- Click the When dropdown and select a conditional statement. You can create rules based on value, date, or formula.
- Enter an appropriate value in the text field.
- Click the Then dropdown and select the custom cell formatting. You can change the background color, text color, or text emphasis.
- Click Save Rule to apply the rule to your selected cells.
You can create more complex conditions by clicking Add Another Condition. Additional conditions have two settings:
- And (&) allows you to add additional "When" statements to one formatting condition.
- Otherwise (/) lets you add multiple formatting options to one rule.
In the example below, when cells A2:D20 contain a value greater than $100,000.00, the cells have a yellow fill and display as bold text. Cells with values less than $100,000.00 have a red fill and display in plain text.
Note: The order of conditions affects their usage. Make sure your conditions are in the order you want operations to occur (upper conditions are considered first).
Manage rules
After you create a formatting rule, you can edit it by selecting Manage Rules in the Conditions menu.
The Conditional Formatting panel shows the rules applied to your current selection or current sheet. You can add, remove, or edit these rules from this panel or clear all rules by choosing Clear Entire Sheet from the Conditions dropdown.
Modify rules
To modify an existing rule:
- On the Conditional Formatting panel, hover over the rule and click the icon for that rule.
- Select Edit from the dropdown menu.
- Apply the necessary edits and click Save Rule to update the rule.
Apply a rule to a new selection
To apply an existing rule to a new selection:
- Select the cells you want to apply the rule to.
- On the Conditional Formatting panel, hover over the rule and click the icon for that rule.
- Click Apply to Selection from the dropdown menu.
A note on ranges
When infinite ranges (D:D) are used with conditional formatting, there may be instances where the XLSX export can struggle to open. If you run into this, try setting a finite range ($D2:D99) on the conditional formatting.