Formula/text/swriter/02/14020000.xhpformulas; in text documentsoperators; in table formulasstatistical functions in tablesmathematical functions in tablestrigonometric functions in tablespages;number of pages in table formulasvariables;document properties in table formulasarithmetical operators in formulas
Formula
Opens a submenu, from which you can insert a formula into the cell of a table. Place the cursor in a cell in the table or at the position in the document where you want the result to appear. Click the Formula icon and choose the desired formula from the submenu.The formula appears in the input line. To specify a range of cells in a table, select the desired cells with the mouse. The corresponding cell references also appear in the input line. Enter additional parameters, as necessary, and click Apply to confirm your entry. You can also enter the formula directly if you know the appropriate syntax. This is necessary, for example, in the Insert Fields and Edit Fields dialogs.With the cursor in a table, press F2In the Table toolbar, press the Formula icon.
Formula icon in Table toolbarFormula
Summary of Formula Options
Basic Calculation Functions
OperationNameExampleAddition+Calculates the total.Example: <A1> + 8Subtraction-Calculates the differenceExample: 10 - <B5>MultiplicationMUL or *Calculates the product.Example: 7 MUL 9DivisionDIV or /Calculates the quotientExample: 100 DIV 15
Basic Functions in the Submenu
FunctionNameExampleSumSUMCalculates the sum of the selected cells.Example: SUM <A2:C2> displays the sum of the values in cells A2 to C2RoundROUNDRounds a number to the specified decimal places.Example: 15.678 ROUND 2 displays 15.68PercentPHDCalculates a percentageExample: 10 + 15 PHD displays 10.15Square RootSQRTCalculates the square root.Example: SQRT 25 displays 5.00PowerPOWCalculates the power of a number.Example: 2 POW 8 displays 256.00
Operators
You can insert various operators in your formula. Choose from the following functions:
OperatorNameExampleList Separator|Separates the elements in a list.Example of using a list:MIN 10|20|50|<C6>|<A2:B6>|20EqualEQ or ==Checks if selected values are equal. If they are unequal, the result is zero, otherwise 1 (true) appears.Example: <A1> EQ 2 displays 1, if the content of A1 equals 2.Not EqualNEQ or !=Tests for inequality between selected values.Example: <A1> NEQ 2 displays 0 (wrong), if the content of A1 equals 2.Less than or EqualLEQTests for values less than or equal to a specified value.Example: <A1> LEQ 2 displays 1 (true), if the content of A1 is less than or equal to 2.Greater than or EqualGEQTests for values greater than or equal to a specified valueExample: <A1> GEQ 2 displays 1 (true), if the content of A1 is greater than or equal to 2.LessLTests for values less than a specified valueExample: <A1> L 2 displays 1 (true), if the content of A1 is less than 2.GreaterGTests for values greater than a specified valueExample: <A1> G 2 displays 1 (true), if the content of A1 is greater than 2.Boolean OrORTests for values matching the Boolean ORExample: 0 OR 0 displays 0 (false), anything else results in 1 (true)Boolean X OrXORTests for values matching the Boolean exclusive ORExample: 1 XOR 0 displays 1 (true)Boolean AndANDTests for values matching the Boolean ANDExample: 1 AND 2 displays 1 (true)Boolean NotNOTTests for values matching the Boolean NOTExample: NOT 1 (true) displays 0 (false)
Statistical Functions
You can choose from the following statistical functions:
FunctionNameExampleMeanMEANCalculates the arithmetic mean of the values in an area or a list.Example: MEAN 10|30|20 displays 20Minimum ValueMINCalculates the minimum value in an area or a list.Example: MIN 10|30|20 displays 10Maximum ValueMAXCalculates the maximum value in an area or a list.Example: MAX 10|30|20 displays 30.00ProductPRODUCTCalculates the product of the selected cells.Example: PRODUCT <A2:C2> displays the product of the values in cells A2 to C2CountCOUNTCounts the number of non empty cells.Example: COUNT <A2:C2> displays the number of non empty cells in A2 to C2.
Functions
You can choose from the following functions:
FunctionNameExampleSineSINCalculates the sine in radiansExample: SIN (PI/2)CosineCOSCalculates the cosine in radians.Example: COS 1TangentTANCalculates the tangent in radians.Example: TAN <A1>Arc SineASINCalculates the arc sine in radians.Example: ASIN 1Arc CosineACOSCalculates the arc cosine in radians.Example: ACOS 1Arc TangentATANCalculates the arc tangent in radians.Example: ATAN 1Absolute valueABSReturns the absolute value of the number.Example: ABS -34 returns 34SignSIGNReturns the algebraic sign of the number.Example: SIGN -23 returns -1
Variables for document properties
The following document properties are also found under File - Properties - Statistics.
NameDescriptionCHARNumber of characters in the documentWORDNumber of words in the documentPARANumber of paragraphs in the documentGRAPHNumber of graphics in the documentTABLESNumber of tables in the documentOLENumber of OLE objects in the documentPAGETotal number of pages in the document
More Defined Values
DescriptionNameValuePIPI3.1415...Euler's constantE2.71828...TrueTRUEnot equal to 0FalseFALSE0