18.11.2014 Views

Microsoft Office

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Part III<br />

Creating Charts and Graphics<br />

FIGURE 21.15<br />

The Conditional Formatting Rules Manager dialog box.<br />

Creating Formula-Based Rules<br />

Excel’s conditional formatting feature is versatile, but sometimes it’s just not quite versatile enough.<br />

Fortunately, you can extend its versatility by writing conditional formatting formulas.<br />

The examples later in this section describe how to create conditional formatting formulas for the following:<br />

n<br />

n<br />

n<br />

To identify text entries<br />

To identify dates that fall on a weekend<br />

To format cells that are in odd-numbered rows or columns (for dynamic alternate row or columns<br />

shading)<br />

n To format groups of rows (for example, shade every two groups of rows).<br />

n To display a sum only when all precedent cells contain values<br />

Some of these formulas may be useful to you. If not, they may inspire you to create other conditional formatting<br />

formulas.<br />

To specify conditional formatting based on a formula, select the cells and then choose Home ➪ Styles ➪<br />

Conditional Formatting ➪ New Rule. This command displays the New Formatting Rule dialog box. Click<br />

the rule type labeled Use A Formula To Determine Which Cells To Format, and you’ll be able to specify the<br />

formula.<br />

You can type the formula directly into the box, or you can enter a reference to an existing formula. As with<br />

normal Excel formulas, the formula you enter here must begin with an equal sign (=).<br />

The formula must be a logical formula that returns either TRUE or FALSE. If the formula evaluates<br />

to TRUE, the condition is satisfied, and the conditional formatting is applied. If the for-<br />

NOTE<br />

mula evaluates to FALSE, the conditional formatting is not applied.<br />

434

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!