LibreOfficeDev 25.8 Help
sssoj‖You can use the following operators in LibreOfficeDev Calc:
FPvox‖BCT76‖These operators return numerical results.
| pbFEA‖Operator | 49fhx‖Name | 3juWm‖Example | 
|---|---|---|
| + | 8VGky‖Addition | 1+1 | 
| - | HNAdf‖Subtraction | 2-1 | 
| - | Cy2wm‖Negation | -5 | 
| * | mQ8FF‖Multiplication | 2*2 | 
| / | RJx3b‖Division | 9/3 | 
| % | ehGjR‖Percent | 15% | 
| ^ | Bp5QG‖Exponentiation | 3^2 | 
QZRSe‖Prefix "-" (negation) has a higher precedence than "^" (exponentiation). For example -3^2 equals 9, which is the square of a negative number.
rod4c‖These operators return either true or false.
| qxQ83‖Operator | 8jQ6F‖Name | CCsqC‖Example | 
|---|---|---|
| = | ubUi7‖Equal | A1=B1 | 
| > | vsj86‖Greater than | A1>B1 | 
| < | vKBrR‖Less than | A1<B1 | 
| >= | 4wHTT‖Greater than or equal to | A1>=B1 | 
| <= | 8ghop‖Less than or equal to | A1<=B1 | 
| <> | dXwNM‖Inequality | A1<>B1 | 
qVCHs‖The operator combines separate texts into one text.
| D3PA9‖Operator | bHMKb‖Name | Y4cRR‖Example | 
|---|---|---|
| & | PPAnS‖text concatenation | JDUDf‖"Sun" & "day" is "Sunday" | 
X3A4D‖These operators return a cell range of zero, one or more cells.
AV5Zu‖Range has the highest precedence, then intersection, and then finally union.
| nMVzZ‖Operator | taxei‖Name | tfD9G‖Example | 
|---|---|---|
| : | hLJDt‖Range | MGA8Q‖A1:C108, A:D or 3:13 | 
| ! | XoTEi‖Intersection | 6z2iQ‖SUM(A1:B6!B5:C12) LEZqv‖Calculates the sum of all cells in the intersection; in this example, the result yields the sum of cells B5 and B6. | 
| ~ | aAvYu‖Concatenation or union | 56Udn‖Takes two references and returns a reference list, which is a concatenation of the left reference followed by the right reference. Double entries are referenced twice. FayxP‖=COUNT(A1:B2~B2:C3) counts values of A1:B2 and B2:C3. Note that the cell B2 is counted twice. EYFWA‖=INDEX(A1:B2~C1:D2;2;1;2) selects cell C2, that is, the first cell of the second row, first column, of the second range (C1:D2) of the range list. | 
nVdpz‖A reference list is not allowed inside an array expression.
AnY7r‖Associativity and precedence of operators, from highest to lowest precedence.
| 2oYZr‖Associativity | 9o8yW‖Operator(s) | rpJz9‖Comments | 
|---|---|---|
| K9e8H‖left | : | Rj4Dm‖Range. | 
| 7CcBD‖left | ! | 5KRBi‖Reference intersection (A1:C4!B1:B5 is B1:B4). | 
| EvVGL‖left | ~ | QifDG‖Reference union. | 
| 7fAvR‖right | +,- | x6cEn‖Prefix unary operators. For example, -5 or -A1. Note that these have a different precedence than add and subtract. | 
| pAdor‖left | % | cML5P‖Postfix unary operator % (divide by 100). Note that this is legal with expressions, for example, B1%. | 
| X6xsj‖left | ^ | cB6AG‖Power (2^3 is 8). | 
| 2YAKJ‖left | *,/ | syUtD‖Multiply, divide. | 
| uQT7C‖left | +,- | wz3Vr‖Binary operations add, subtract. Note that unary (prefix) + and - have a different precedence. | 
| CLVku‖left | & | 36XAc‖Binary operation string concatenation. Note that "&" shall be escaped when included in an XML document. | 
| vaLpi‖left | =, <>, <, <=, | Y6nxm‖Comparison operators equal to, not equal to, less than, less than or equal to, greater than, greater than or equal to. | 
haEyR‖Prefix "-" has a higher precedence than "^", "^" is left-associative, and reference intersection has a higher precedence than reference union.
EDyXx‖Prefix "+" and "-" are defined to be right-associative. However, note that typical applications which implement at most the operators defined in this specification (as specified) may implement them as left-associative, because the calculated results will be identical.
nbL6F‖Precedence can be overridden by using parentheses, so "=2+3*4" computes to 14 but "=(2+3)*4" computes 20.