Pages - Defining Conditional Formatting Rules

background image

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 Table button, and then click Format.

3

Click “Show rules”, and then choose an item from the “Choose a rule” pop-up menu.

The items in the top section of the menu apply tests to numeric values. Items in the
middle section are for text values. The “With dates” item 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 to display the cell reference field.

Specify a cell reference by clicking in a table cell. You can also type a cell reference and
press Return.

The Between item 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.

196

Chapter 9

Working with Table Cells

background image

Chapter 9

Working with Table Cells

197

For the “With dates” item, before specifying a test value choose items 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.
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.