At 11:22 05/06/2009 +0800, Tony Zhang wrote:
is there a way to set the cell's color according to some rules automatically?
take the table below for example. if the second column's number
equals 1, i want to it displays in red. and i want this rule could
automatically applied to the entire sheet.
[...]
First create a cell style having the red colour:
o Go to Format | Styles and Formatting... (or the Styles and
Formatting button in the Formatting toolbar, or press F11).
o Ensure that the Cell Styles button is selected in the Styles and
Formatting window.
o Click the New Style from Selection button.
o Give your new cell style a name - possibly "Red"?
o Right-click on the name of the new style now appearing in the list
and select Modify...
o On the Background tab, select your preferred colour.
o This will have changed the cell style of any selected cells, so
now double-click on the original cell style name (perhaps "Default")
to correct this.
o (You can now close the Styles and Formatting window.)
Now apply this style conditionally to your cells:
o Select the area you wish to be affected. (To select the entire
sheet, click in the square at the top left - where the column and row
labels meet.)
o Go to Format | Conditional Formatting... .
o With "Condition 1" ticked, select "Cell value is" and "equal to".
o In the third box, enter your value (here 1).
o For Cell Style, select "Red" (or whatever) from the drop-down menu.
I trust this helps.
Brian Barker
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]