Defining Conditional Formatting Rules
A conditional formatting rule is used to detect when cells contain a test value, which
can be either a specific value that you supply or a value that matches a value currently
in a specific table cell. The rule specifies the formatting to apply to the cells when they
contain the test value.
To define rules:
1
Select one or more cells.
2
Click Inspector in the toolbar, click the Cells inspector button, and then click “Show rules.”
You can also choose Format > Show Conditional Format Rules.
3
Choose an option from the “Choose a rule” pop-up menu.
The options in the top section of the menu apply tests to numeric values. Options in
the middle section are for text values. The “With dates” option is for dates.
4
To specify a specific test value, type it into the value field, to the right of the
pop-up menu.
You can also use the value in a table cell as a test value. To do so, click the small blue
circle in the value field.
Click to select a table cell.
The cell reference field appears.
Specify a cell reference by clicking a table cell. You can also type a cell reference and
press Return; see “Referring to Cells in Formulas” on page 126 for information about
writing cell references.
The Between rule requires that you specify two test values. The formatting is applied if
either of the numbers or any number in between them appears in the cell or cells.
For the “With dates” rule, before specifying a test value choose options from the pop-
up menus on both sides of the test value field.
5
To specify formatting to apply when cells contain the test value, click Edit.
Text color well: Click it to select a color to apply to cell values.
Font style buttons: Click B to show cell values in boldface, click I to show them in
italics, click U to underline cell values, or click T to apply the strikethrough style.
Fill color well: Click it to select a cell fill color.
84
Chapter 4
Working with Table Cells
Chapter 4
Working with Table Cells
85
As you click, the Sample box displays the effect of your selections. When you’re
satisfied with the effect, click Done.
6
To add another rule, click the Add button (+) and repeat steps 3 through 5.
If more than one rule is defined for a cell, and the cell’s value satisfies the conditions of
multiple rules:
The text color applied is the color associated with the topmost rule with a text
Â
color specified.
The font style applied is the font style associated with the topmost rule that has a
Â
font style specified.
The fill color applied is the fill color associated with the topmost rule that has a fill
Â
color specified.
After the text color you specify has been applied to a cell value, if you type new text
into the cell after placing an insertion point and changing the text color in the format
bar or the Text inspector, the new text appears in the new text color, but the existing
text retains the color you set in the rule.