Conditional formatting is a powerful feature in LibreOffice Calc that allows you to apply formatting to cells based on certain conditions. One of the conditions you can use is the "Formula is" condition, which allows you to specify a formula that determines whether the formatting should be applied.
When using the "Formula is" condition, you can refer to other cells in your formula to determine the formatting. This is done using cell references, which are a combination of the column letter and the row number of the cell. For example, the cell reference A1 refers to the cell in column A and row 1.
To use cell references in the "Formula is" condition, you need to start your formula with an equal sign (=). For example, if you want to apply formatting to a cell if the value in cell A1 is greater than 10, you would use the formula =A1>10.
Cell references can be used in various ways in the "Formula is" condition. Here are a few examples:
Using Relative Cell References
By default, when you use a cell reference in a formula, it is considered a relative reference. This means that the reference will change when you copy the formula to other cells. For example, if you have a formula in cell B1 that refers to cell A1, when you copy the formula to cell B2, it will automatically update to refer to cell A2.
Here's an example of how you can use relative cell references in the "Formula is" condition:
=A1=B1
This formula compares the value in cell A1 with the value in the corresponding cell in column B. If the values are equal, the formatting will be applied.
Using Absolute Cell References
Sometimes, you may want to use a cell reference that doesn't change when you copy the formula to other cells. This is where absolute cell references come in handy. You can make a cell reference absolute by adding a dollar sign ($) before the column letter and/or the row number. For example, $A$1 refers to cell A1 and will not change when you copy the formula.
Here's an example of how you can use absolute cell references in the "Formula is" condition:
=$A$1>10
This formula compares the value in cell A1 with the number 10. If the value in cell A1 is greater than 10, the formatting will be applied.
Using Mixed Cell References
Sometimes, you may want to use a combination of relative and absolute cell references in a formula. This is where mixed cell references come in handy. You can make either the column letter or the row number absolute by adding a dollar sign ($) before it. For example, $A1 refers to column A and will not change when you copy the formula, but the row number will change.
Here's an example of how you can use mixed cell references in the "Formula is" condition:
=A$1>B1
This formula compares the value in cell A1 with the value in the corresponding cell in column B. The column reference A$1 will not change when you copy the formula, but the row reference B1 will change.
Using cell references in the "Formula is" condition allows you to create more dynamic and flexible conditional formatting rules in LibreOffice Calc. By referring to other cells in your formulas, you can base the formatting on the values in those cells, making it easier to highlight specific data or trends.
References
| Reference | Description |
|---|---|
| LibreOffice Calc Documentation | Official documentation for LibreOffice Calc |
| LibreOffice Community Forums | Online community forums for LibreOffice users |
| LibreOffice Wiki | Wiki with additional information and tutorials for LibreOffice |