Friday, October 08, 2004

Conditional Formatting in Excel

Conditional formatting allows you to change the format of a cell depending on some criteria. These can be related to the cell itself or to some other cell on the same sheet.

An easy one to set up to see how this concept works is working with a list of $ values that have some negative values that you want to show in red.
You can use Conditional Formatting to check if the value of the cell is less than 0. If it is then make the font red. Try this out.

Select the range of data and then from the Format Menu choose Conditional Formatting.
In the dialog box make the following selections:
"Cell Value is"
"Less than"
"0" (just type a zero)
Then click Format and choose red in the font tab colour drop down box.
Click OK all the way out.

Negative values should now be displayed in Red. Note: conditional formatting has priority over any other formatting applied to a cell.

For a great article from Tip of the Day on How to shade Every Other Row in Excel using Conditional Formatting follow the link.