blob: d1b02ce3d320b4a6ef7c0c5bc1d2e8ff66399a4d [file] [log] [blame]
<html><head>
<meta HTTP-EQUIV="content-type" CONTENT="text/html; charset=UTF-8">
</head>
<body LANG="en-US">
<H2 ALIGN=CENTER>&nbsp;</H2>
<H2 ALIGN=CENTER>&nbsp;</H2>
<H2 ALIGN=CENTER>How to apply</H2>
<H2 ALIGN=CENTER>Conditional Formatting to a Cell</H2>
<P ALIGN=CENTER><BR><BR>
</P>
<H5 ALIGN=CENTER><I>Provided from</I></H5>
<H5 ALIGN=CENTER><I>the OpenOffice.org Documentation
Project</I></H5>
<P ALIGN=CENTER STYLE="page-break-before: always"><BR><BR>
</P>
<DIV ID="Table of Contents1">
<DIV ID="Table of Contents1_Head">
<P><FONT FACE="Arial"><FONT><B>Table
of Contents</B></FONT></FONT><BR>
</P>
</DIV>
</DIV>
<ol>
<li>
<DIV ID="Table of Contents1">
<DIV ID="Table of Contents1"><FONT FACE="Times New Roman"> <a href="#1">Introduction:
an example </a></FONT></DIV>
</DIV>
</li>
<li>
<DIV ID="Table of Contents1"><FONT FACE="Times New Roman"> <a href="#2">Create
a new Style 3</a></FONT></DIV>
</li>
<li>
<DIV ID="Table of Contents1"><FONT FACE="Times New Roman"> <a href="#3">Apply
the Conditional Formatting </a></FONT></DIV>
</li>
<li>
<DIV ID="Table of Contents1"><FONT FACE="Times New Roman"><a href="#4">Credits
</a></FONT></DIV>
</li>
</ol>
<H3><A NAME="1"></A>
1. Introduction: an example</H3>
<P><FONT>You
are a bookseller and sell books every day. You'd like to highlight, in color,
the number of books sold during a week with the result displayed in yellow if
less than 100 and in blue if 100 or more were sold.</FONT></P>
<P><FONT>To
do so, you have to create 2 new styles for each color and 2 formatting conditions:
one for numbers less than 100 and another for those numbers greater than or
equal to 100.</FONT></P>
<P><FONT>Let's
do it!</FONT></P>
<H3><A NAME="2"></A>2. Create a new Style</H3>
<P><FONT>To
create a new Style, open the <B>Stylist</B>: </FONT> </P>
<UL>
<LI><FONT>choose <B>Format&ndash;Stylist</B></FONT>
<LI><FONT>or press <B>F11 </B>key,</FONT>
<LI><FONT>or click the <B>Stylist icon</B> on the <B>Function bar</B>: <IMG SRC="sty1.jpg" NAME="Image1" ALIGN=BOTTOM WIDTH=28 HEIGHT=29 BORDER=0></FONT>
</UL>
<P><FONT>In
the Stylist window, there are several styles ready to use. You'll use the <B>Default</B>
style as a base to create your own:</FONT></P>
<UL>
<LI><FONT>select the <B>Default </B>style,</FONT>
<LI><FONT>right click on it to access the context menu,</FONT>
<LI><FONT>choose <B>New...</B></FONT>
</UL>
<P><IMG SRC="sty2g.GIF" NAME="Graphic1" ALIGN=LEFT WIDTH=633 HEIGHT=194 BORDER=0 alt="conditional formatting window"><BR CLEAR=LEFT>
<FONT>The dialog window that will appear has several tabs as in the diagram
below:</FONT></P>
<UL>
<LI>
<P STYLE="margin-bottom: 0cm">in the <B>Organizer
</B><SPAN STYLE="font-weight: medium">tab</SPAN><B>,</B> type a name for
your style; here it is simply called '<B>blue</B>', </P>
<LI>
<P STYLE="margin-bottom: 0cm">now switch to
the <B>Background </B>tab and <FONT>choose a blue color in the color
palette,</FONT></P>
<LI><FONT>now switch to the Font tab, scroll to find <B>Automatic</B>, and click
<B>OK.</B></FONT>
</UL>
<P><FONT>In
the Stylist, your new style will be displayed with the name you gave it. Repeat
the steps above to create the style '<B>yellow</B>'.</FONT></P>
<P><IMG SRC="sty3g.GIF" NAME="Graphic2" ALIGN=BOTTOM WIDTH=200 HEIGHT=222 BORDER=0><BR>
<I><B>Note</B>: You have created a background style, but of course you may apply
other features to that style. By clicking on the other tabs, you may access
many other functions, such as, apply a border, change font, alignment, etc.</I></P>
<H3><A NAME="3"></A>3. Apply the Conditional Formatting</H3>
<P>
<FONT>You have typed your figures, inserted your formulas in the cells,
and now you wish to add some colors!</FONT></P>
<P>
<FONT>In our example, the colors are to be displayed in cell [<B>B9</B>]</FONT></P>
<OL>
<LI> Select the cell [<B>B9</B>]
<LI> <FONT>in the <B>Format </B>menu, choose <B>Conditional Formatting</B></FONT>
<LI>
<FONT>In the window that will appear, you'll insert your condition:</FONT>
<P STYLE="margin-bottom: 0cm"><img src="sty4_bis.gif" width="749" height="347"></P>
<LI> <FONT>under <B>Condition 1</B>, click the small triangle of the first drop-down
menu and choose '<B>Cell value is'</B></FONT>
<LI> Then, in the second drop-down menu, choose '<B>greater than'</B>
<LI> <FONT>in the next box to the right, insert the value, 99. Eventually, you
can change the selected cell by clicking on the <B>Shrink icon <IMG SRC="shrink_icon.GIF" NAME="Graphic4" ALT="shrink icon" ALIGN=BOTTOM WIDTH=28 HEIGHT=24 BORDER=0></B></FONT>
<LI><SPAN STYLE="font-style: normal"><FONT>In the drop-down menu labeled, <B>Cell
Style</B>, search and select the '<B>Blue</B>' style,</FONT></SPAN>
<LI> <FONT>Check the <B>Condition 2 </B>check-box, repeat steps from
4 up to 7, but use <B>'less than', a value of '100',</B> and <B>'yellow' </B>style
where applicable,</FONT>
<li><FONT>Click on <B>OK,</B></FONT></li>
</OL>
<P> <FONT>Look at the result: type in '122' in cell [B9] and the color
changes!</FONT></p>
<H3><IMG SRC="sty5g.GIF" NAME="Graphic5" ALIGN=LEFT WIDTH=327 HEIGHT=217 BORDER=0></H3>
<H3>&nbsp;</H3>
<H3>&nbsp;</H3>
<H3>&nbsp;</H3>
<H3>&nbsp;</H3>
<H3>&nbsp;</H3>
<H3><BR>
</H3>
<H3><B>4. Credits
</B><A NAME="4"></A></H3>
<P><B>Author</B>: Sophie
Gautier</P>
<P><B>Thanks to</B>:
Richard Holt, great proof reader and OOo contributor</P>
<P><B>Intgr by</B>:
Gianluca Turconi</P>
<P><B>Last modified</B>:
January 28, 2002</P>
<P><B>Contacts</B>:
<SPAN STYLE="font-weight: medium">OpenOffice.org Documentation Project </SPAN><A HREF="http://documentation.openoffice.org/index.html"><SPAN STYLE="font-weight: medium">http://documentation.openoffice.org/index.html</SPAN></A></P>
<P><B>Translation</B>:
Gianluca Turconi</P>
<H3><BR>
<BR>
</H3>
<P>&nbsp;</P>
<P>
<!--EndFragment-->
<BR>
<BR>
</P>
</body></html>