![openoffice conditional formatting number range openoffice conditional formatting number range](https://i.ytimg.com/vi/_PMCHrHQTR4/maxresdefault.jpg)
Select all cells with the random numbers.Now you can apply the conditional formatting to the sheet: If you cannot see the entire range, because the Function Wizard is obscuring it, you can temporarily shrink the dialog using the Shrink / Maximize icon. Use the mouse to select all your random numbers. Set the cursor in a blank cell, for example, J14, and choose Insert - Function.In our particular example, we are calculating the average of the random values. Assign a different background color for the cell and assign a name (for this example, "Below"). To define a second style, click again in a blank cell and proceed as described above.For this example, name the style "Above". In the Styles and Formatting window, click the New Style from Selection icon.In the Format Cells dialog on the Background tab, select a background color.Click in a blank cell and select the command Format Cells in the context menu.Ensure that the Styles and Formatting window is visible before proceeding. The next step is to apply a cell style to all values that represent above-average turnover, and one to those that are below the average. In the same way as described above, drag down the corner of the rightmost cell in order to create more rows of random numbers.Click the bottom right corner of the selected cell, and drag to the right until the desired cell range is selected. Copy the formula to create a row of random numbers.If you want integers of between 0 and 50, enter the formula =INT(RAND()*50). In one of the cells enter the formula =RAND(), and you will obtain a random number between 0 and 1. For your test you can create tables with any random numbers: First of all, write a table in which a few different values occur.This is possible with conditional formatting. For example, in a table of turnovers, you can show all the values above the average in green and all those below the average in red. You want to give certain values in your tables particular emphasis. The dialog is described in detail in LibreOffice Help, and an example is provided below:Įxample of Conditional Formatting: Highlighting Totals Above/Under the Average Value Step1: Generate Number Values Enter the condition(s) into the dialog box.Choose Format - Conditional Formatting.Select the cells to which you want to apply a conditional style.2 Example of Conditional Formatting: Highlighting Totals Above/Under the Average Value.getPropertyValue ( "ConditionalFormat" ) // create a condition and apply it to the rangeĬom. get the conditional format object of the cell rangeĬom. The xSheet is the .XSpreadsheet interface of a spreadsheet. It uses the cell style "MyNewCellStyle" that is applied to each cell containing a value greater than 1. The following example applies a conditional format to a cell range. The method clear() removes all condition entries.The methods removeByIndex() removes the condition entry at the specified position.StyleName: The name of the cell style to apply.SourcePosition: A .CellAddress struct that contains the base address for relative cell references in formulas.Formula2 is used only if the property Operator contains BETWEEN or NOT_BETWEEN. Formula1 and Formula2: Strings that contain the values or formulas to evaluate.Operator: A .ConditionOperator constant describing the operation to perform.
![openoffice conditional formatting number range openoffice conditional formatting number range](https://wiki.documentfoundation.org/images/f/fe/FR.FAQ_Calc_143_BarreDeDonnees1.png)
It expects a sequence of .PropertyValue objects.
![openoffice conditional formatting number range openoffice conditional formatting number range](https://i.stack.imgur.com/KIfaw.png)
The service .TableConditionalFormat contains all format conditions and returns .TableConditionalEntry objects. The interface .XSheetConditionalEntry gets and sets the cell style name.The interface .XSheetCondition gets and sets the operator, the first and second formula and the base address for relative references.After a conditional format is changed, it has to be reinserted into the property set of the cell or cell range.Ī condition entry of a conditional format is represented by the service .TableConditionalEntry.