Microsoft Office Tutorials and References

In Depth Information

**Chapter 19: Conditional Formatting and Data Validation**

Identifying cells that meet a numeric criteria

The example in this section is similar to the previous example, but it involves values. The range

A5:P32 uses the following conditional formatting formula:

=COUNTIF(A5,$A$1)=1

This formula takes advantage of the fact that the COUNTIF function can handle criteria that are

entered in a cell. Figure 19-22 shows the worksheet when cell A1 contains the text >90.

Figure 19-22:
Cells that meet the criteria entered in cell A1 are highlighted.

Using custom functions in conditional formatting formulas

Excel’s conditional formatting feature is very versatile, and the ability to create your own

formulas to define the conditions will cover most needs. But if custom formulas still aren’t versatile

enough, you can create custom VBA functions and use those in a conditional formatting formula.

This section provides three examples of VBA functions that you can use in conditional formatting

formulas.