Microsoft Office Tutorials and References
In Depth Information
Chapter 19: Conditional Formatting and Data Validation
Notice that the formula that you enter in Step 4 contains a relative reference to the upper-left
cell in the selected range.
Generally, when entering a conditional formatting formula for a range of cells, you’ll use a
reference to the active cell, which is normally the upper-left cell in the selected range. One exception
is when you need to refer to a specific cell. For example, suppose that you select range A1:B10,
and you want to apply formatting to all cells in the range that exceed the value in cell C1. Enter
this conditional formatting formula:
In this case, the reference to cell C1 is an absolute reference: It will not be adjusted for the cells in
the selected range. In other words, the conditional formatting formula for cell A2 looks like this:
The relative cell reference is adjusted, but the absolute cell reference is not.
Using references to other sheets
Previous versions of Excel did not allow references to other worksheets in conditional formatting
formulas. That restriction has been lifted in Excel 2010.
If you plan to share your workbook with others who don’t use Excel 2010, you need to avoid
using references to other worksheets. Rather, create a reference to that cell on the sheet that
contains the conditional formatting. For example, if your conditional formatting formula needs to
refer to cell A1 on Sheet3, you can insert the following formula into a cell on the active sheet:
Then use a reference to that cell in your conditional formatting formula.
Another option is to create a name for the cell (by using Formulas➜Defined Names➜
Define Name). After defining the name, you can use the name in place of the cell
reference in your conditional formatting formula. If you use this technique, the named cell
can be in any worksheet in the workbook.
Conditional formatting formula examples
Each of these examples uses a formula entered directly into the New Formatting Rule dialog box,
after you select the rule type labeled Use a Formula to Determine Which Cells to Format. You
decide the type of formatting that you want to apply conditionally.