Conditional formatting in Excel 2007 (based on value of another cell)

To format a cell based on the value of another cell follow these steps:

1. Select the cell you want to format, “A1” in this example.
2. In the Home tab, Styles group, click on Conditional Formatting.
3. Select New Rule.


4. The New Formatting Rule window will open.


5. Click Use a formula to determine which cells to format.
6. The New Formatting Rule window will now look like this:


7. In the edit box labeled “Format values where this formula is true“, enter “=” followed by a formula referencing the other cell.

In this example the formula: “=B1<0” is entered.
8. Click the Format button. The Format Cells window will open.


9. Specify the formatting you want. In this example I changed the cell color to “RED”.
10. Click OK to close The Format Cells window.

11. Click OK to close The New Formatting Rule window.

To summarize this example: cell A1 will have a RED color when cell B1 value is less than zero.

How to format a cell based on the value of another cell (conditional formatting)

  1. Select the cells for which you want to add conditional formatting.
  2. On the Format menu, click Conditional Formatting.
  3. The Conditional Formatting dialogue will open.
  4. xcformatf2.gif

  5. In the first combo box select Formula is.
  6. In the text box next to it write the formula as follows: =$A$1<100. An equal sign followed by the cell reference followed by a comparison or a condition.
  7. Click the format button, the Format Cells dialogue will open.
  8. xcformat.gif

  9. Select the formatting you want to apply when the cell value meets the condition e.g. you can set the font color to red.

In this example, if the value of cell A1 is less than 100, then the color of the selected cells will be red.

Applies to: Excel 2003