<< Click to Display Table of Contents >> Creating new formatting rules |
To apply conditional formatting to cells, you select the relevant cells and then create a formatting rule for them. Formatting rules always consist of two parts:
▪a condition
▪... and the formatting to be applied if this condition is met.
Example: "If the cell content is greater than 1000, display the cell in red."
Application example
To define (and also apply) such a rule, proceed as follows:
1. | Navigate to the desired cell. Of course, you can also select multiple cells to apply conditional formatting to them all at once. |
2. | Choose the ribbon command Home| group Format | Conditional formatting and select New rule from the dropdown menu to open the dialog box. |
Tip: For quick use of common formatting rules, you can also apply certain options directly from the dropdown menu of the command Conditional formatting (see "Tip: Applying formatting rules directly from the dropdown menu" below). |
3. | In the dialog box, first select the type of condition to be used for Type. |
In our example, you would select the option Format only cells that contain. (For more information on all available options, see Types of conditional formatting). |
4. | You can now specify the desired condition. |
In our example, this would be the condition "cell value is larger than 1000". Thus, select the options Cell value and greater than. Then enter 1000 on the right. |
5. | Finally, click on the Format button, and specify the formatting options to be applied if this condition is met. |
In our example, switch to the Font tab, set the font color to Red and confirm with OK. |
6. | All necessary settings are now made. Click on OK to confirm and create the new rule. |
The new formatting rule is now created – and is applied immediately to the selected cells. This has the following effect:
▪If the cell content is smaller than or equal to 1000, the cell will be displayed in its original format.
▪If, on the other hand, the value is greater than 1000, the conditional formatting will be applied, thus the cell contents will be displayed in red.
Note: You can create as many formatting rules for a cell (or cell range) as you like. For example, you can add a second rule that formats the cell in boldface if it contains a value less than zero.
Tip: Applying formatting rules directly from the dropdown menu
If you choose the ribbon command Home | group Format | Conditional formatting , you can apply some frequently used formatting rules directly from the dropdown menu.
The following types of formatting rules are available at the top of this dropdown menu:
▪Highlight cells: see description in the next section "Types of conditional formatting", paragraph Format only cells that contain ...
▪Highest/lowest values: see description in next section "Types of conditional formatting", paragraph Format only upper or lower values
▪Data bars, Color scales, Icon sets: see description in next section "Types of conditional formatting", paragraph Format all cells based on their values
In the submenus, click on the entry More rules to open the dialog box with even more differentiable setting options if required.