Using Conditional Formatting
From Apache OpenOffice Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
- Introduction
- Entering Data Using the Keyboard
- Speeding up Data Entry
- Sharing Content between Sheets
- Validating Cell Contents
- Editing Data
- Formatting Data
- Autoformatting Cells and Sheets
- Formatting Spreadsheets Using Themes
- Using Conditional Formatting
- Hiding and Showing Data
- Finding and Replacing in Calc
Using Conditional Formatting
You can set up cell formats to change based on conditions that you specify. For example, in a table of numbers, you can show all the values above the average in green and all those below the average in red.
| To apply conditional formatting, AutoCalculate must be enabled. Choose Tools → Cell Contents → AutoCalculate. |
Conditional formatting depends on the use of styles. If you are not familiar with styles, please refer to Chapter 4. An easy way to set up required styles is to format a cell the way you want it and click the New Style from Selection icon in the Styles and Formatting window. You can define new cell styles before setting up conditional formatting or do it from within the conditional formatting dialog.
To set up conditional formatting:
- In your spreadsheet, select the cells to which you want to apply conditional formatting. You may need to know which cell is the active cell to set up the formatting. If you select several cells, note which cell is active afterward.
- Choose Format → Conditional Formatting from the menu bar.
- On the Conditional Formatting dialog (Figure 57), enter the conditions. Click OK to save. The selected cells are now formatted in the relevant style.
- Cell value is / Formula is
- Specifies whether conditional formatting is dependent on a cell value or formula. If you select cell value is, the Cell Value Condition box is displayed, as shown in the example. With this box, you can choose from conditions including less than, greater than, between, and others.
- Parameter field
- Enter a cell reference, value, or formula in the parameter field or in both parameter fields if you have selected a condition requiring two parameters. You can also enter formulas containing relative references. The relative references are defined with respect to the active cell if multiple cells are selected. For example, if you selected the range A1:A10 by dragging down from A1, then A10 will be the active cell. Any relative references should be written as would be appropriate for A10. The reference will be adjusted automatically for the other cells in the range.
