<p class="Paragraph">Using the menu commands <span class="T1">Format - Conditional formatting</span> the dialog allows you to define up to three conditions per cell, which must be met in order for the selected cells to have a particular format.</p>
<p class="Paragraph">Using conditional formatting, you can, for example, highlight the totals that exceed the average value of all totals. If the totals change, the formatting changes correspondingly, without having to apply other styles manually.</p>
<ol class="L1">
<li class="">
<p class="P2">Select the cells to which you want to apply a conditional style.</p>
</li>
<li class="">
<p class="P2">Select the command <span class="T1">Format - Conditional Formatting</span>.</p>
</li>
<li class="">
<p class="P2">Enter the condition(s) into the dialog box. The dialog is described in detail in the <help:link Id="66890" xmlns:help="http://openoffice.org/2000/help">Help</help:link>, and an example is provided below:</p>
</li>
</ol>
<p class="Head2">
<help:key-word value="Random numbers; generate" tag="kw68151_6" xmlns:help="http://openoffice.org/2000/help"/>Example of conditional formatting: Generate number values</p>
<p class="Paragraph">You want to give certain values in your tables particular emphasis, e.g. in a table of turnovers show all the values above the average in green and all those below the average in red. This is possible with conditional formatting.</p>
<ol class="L2">
<li class="">
<p class="P3">First of all write a table in which a few different values occur. For your test you can create tables with any random numbers:</p>
<p class="P3">In one of the cells enter the formula =RAND(), and you will obtain a random number between 0 and 1. If you want integers of between 0 and 50, enter the formula =INTEGER(RAND()*50).</p>
</li>
<li class="">
<p class="P3">Now, copy the formula to create a row of random numbers. Click the bottom right corner of the selected cell, and drag to the right until the desired cell range is selected.</p>
</li>
<li class="">
<p class="P3">In the same way as described above drag the corner of the cell fully to the bottom right in order to create more rows of random numbers.</p>
</li>
</ol>
<p class="Head2">Example of conditional formatting: Define cell styles</p>
<p class="Paragraph">In our example you now apply two cell styles for your numbers: one style for all values that represent above-average turnover, and one for those that are below the average. The Stylist should be visible.</p>
<ol class="L3">
<li class="">
<p class="P4">Click in a blank cell and select the command <span class="T1">Format Cells</span> in the context menu.</p>
</li>
<li class="">
<p class="P4">In the <help:key-word value="Cell Attributes" tag="kw68151_1" xmlns:help="http://openoffice.org/2000/help"/>
<span class="T1">Cell Attributes</span> dialog, select a background color on the <span class="T1">Background</span> tabpage. Click <span class="T1">OK</span>.</p>
</li>
<li class="">
<p class="P4">In Stylists click the <span class="T1">New style from selection</span> icon. In the dialog enter as the name of the new style, for example, "Above".</p>
</li>
<li class="">
<p class="P4">To define a second style, click again in a blank cell and proceed as described above. Assign a different background color for the cell and a name (e.g., "Below").</p>
</li>
</ol>
<p class="Head2">Example of conditional formatting: Calculate mean</p>
<p class="Paragraph">In our particular example we are calculating the average of the random values. The result is placed in a cell:</p>
<ol class="L4">
<li class="">
<p class="P5">Set the cursor in a blank cell, e.g., J14, and activate the Function Autopilot.</p>
</li>
<li class="">
<p class="P5">Choose the MEAN function. Use the mouse to select all your random numbers. If you cannot see the entire range, because AutoPilot: Functions is obscuring it, you can temporarily zoom out from the dialog using the <help:popup Id="65630" Eid="eingabesymbol" xmlns:help="http://openoffice.org/2000/help">Zoom in/out key</help:popup>.</p>
</li>
<li class="">
<p class="P5">Close AutoPilot: Functions with <span class="T1">OK</span>.</p>
</li>
</ol>
<p class="Head2">Example of conditional formatting: Apply cell</p>
<p class="Paragraph">Now you can apply the conditional formatting to the sheet:</p>
<ol class="L5">
<li class="">
<p class="P6">Select all cells with the random numbers.</p>
</li>
<li class="">
<p class="P6">Select the <span class="T1">Format - Conditional Formatting...</span> command to open the corresponding dialog.</p>
</li>
<li class="">
<p class="P6">Define the condition as follows: If cell value is less than J14, format with cell style "Below", and if cell value is greater than or equal to J14, format with cell style "Above".</p>
<p class="Paragraph">To apply the conditional formatting to other cells later:</p>
<ol class="L6">
<li class="">
<p class="P7">Click one of the cells that has been assigned conditional formatting.</p>
</li>
<li class="">
<p class="P7">Copy the cell to the clipboard, e.g. using <help:switch select="System" xmlns:help="http://openoffice.org/2000/help">
<help:case select="MAC">(Command)</help:case>
<help:default>(Ctrl)</help:default>
</help:switch>(C).</p>
</li>
<li class="">
<p class="P7">Select the cells that are to receive this same formatting.</p>
</li>
<li class="">
<p class="P7">Start the <span class="T1">Edit - Content - Paste special</span> command. You will see the <span class="T1">Paste special</span> dialog .</p>
</li>
<li class="">
<p class="P7">If in the <span class="T1">Selection</span> area you only mark the <span class="T1">Format,</span> field the other markings are undone. Click OK.</p>