« Largest values in an array | Main | Conditional Formatting II »

March 13, 2005

Conditional Formatting I

Conditional formatting is a mechanism that allows the user to apply formatting to a cell or range of cells based on defined conditions. If the rules (conditions) are met, then the specified formatting is applied. In OOo Calc, you can apply up to 3 rules in a cell or range of cells.

In the example below, we have an array of numbers. To illustrate how conditional formatting works, we will apply different formatting to those cells whose values are greater than the average of the range.

cformat1.jpg

We first need to define a new formatting style.

Apply the desired formatting to an isolated cell and invoke the Styles and Formatting dialog as shown below.

cformat5.jpg

Here, we click on the New Style from Selection icon.

cformat6.jpg

This allows us to add our own custom style to the Style catalog.

cformat7.jpg

We will now make use of our newly defined style in the Conditional Formatting dialog, which is enabled as shown below.

cformat2.jpg

We select Condition 1 and the settings are shown below. The Cell STyle drop down list allows to to select any of the styles from the catalog - including any custom style we have defined.

You must use absolute addressing when referencing cells and cell ranges.

cformat3.jpg

The final result of applying conditional formatting on the selected range of cells.

cformat4.jpg

See also:
Creating Custom Cell Styles
Condtional Formatting II

Posted by Dave at March 13, 2005 04:41 AM

Comments

I just stumbled across your weblog a few days ago, and since I have started using Calc a lot the past few weeks, I am enjoying the tutorials like this one.

Posted by: Elaine at March 14, 2005 11:45 AM

Tanks a lot for your help. I was looking for some explanation on Conditional Formatting and what you did is grate.

Posted by: Ernesto Oliveira at April 12, 2005 08:22 AM

Post a comment




Remember Me?