Text Documents (Writer)
HTML Documents (Writer Web)
Spreadsheets (Calc)
Presentations (Impress)
Drawings (Draw)
Database Functionality (Base)
Formulae (Math)
Charts and Diagrams
Macros and Scripting
Office Installation
Common Help Topics
OneOffice Logo

Formula

Opens a sub-menu, 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 sub-menu.

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 the Apply icon 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 dialogue boxes.

To access this command...

With the cursor in a table, press F2

In the Table toolbar, press the Formula icon.

Formula

Summary of Formula Options

Basic Calculation Functions

Operation Name Example
Addition + Calculates the total. Example: + 8
Subtraction - Calculates the difference Example: 10 -
Multiplication MUL or * Calculates the product. Example: 7 MUL 9
Division DIV or / Calculates the quotient Example: 100 DIV 15

Basic Functions in the Sub-menu

Function Name Example
Sum SUM Calculates the sum of the selected cells. Example: SUM displays the sum of the values in cells A2 to C2
Round ROUND Rounds a number to the specified decimal places. Example: 15.678 ROUND 2 displays 15.68
Percent PHD Calculates a percentage Example: 10 + 15 PHD displays 10.15
Square Root SQRT Calculates the square root. Example: SQRT 25 displays 5.00
Power POW Calculates 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:

Operator Name Example
List Separator | Separates the elements in a list. Example of using a list: MIN 10|20
Equal EQ or == Checks if selected values are equal. If they are unequal, the result is zero, otherwise 1 (true) appears. Example: EQ 2 displays 1, if the content of A1 equals 2.
Not Equal NEQ or != Tests for inequality between selected values. Example: NEQ 2 displays 0 (false), if the content of A1 equals 2.
Less than or Equal to LEQ Tests for values less than or equal to a specified value. Example: LEQ 2 displays 1 (true), if the content of A1 is less than or equal to 2.
Greater than or Equal to GEQ Tests for values greater than or equal to a specified value Example: GEQ 2 displays 1 (true), if the content of A1 is greater than or equal to 2.
Less than L Tests for values less than a specified value Example: L 2 displays 1 (true), if the content of A1 is less than 2.
Greater than G Tests for values greater than a specified value Example: G 2 displays 1 (true), if the content of A1 is greater than 2.
Boolean Or OR Tests for values matching the Boolean OR Example: 0 OR 0 displays 0 (false), anything else results in 1 (true)
Boolean X Or XOR Tests for values matching the Boolean exclusive OR Example: 1 XOR 0 displays 1 (true)
Boolean And AND Tests for values matching the Boolean AND Example: 1 AND 2 displays 1 (true)
Boolean Not NOT Tests for values matching the Boolean NOT Example: NOT 1 (true) displays 0 (false)

Statistical Functions

You can choose from the following statistical functions:

Function Name Example
Mean MEAN Calculates the arithmetic mean of the values in an area or a list. Example: MEAN 10|30
Minimum Value MIN Calculates the minimum value in an area or a list. Example: MIN 10|30
Maximum Value MAX Calculates the maximum value in an area or a list. Example: MAX 10|30
Product PRODUCT Calculates the product of the selected cells. Example: PRODUCT displays the product of the values in cells A2 to C2
Count COUNT Counts the number of non-empty cells. Example: COUNT displays the number of non-empty cells in A2 to C2.

Functions

You can choose from the following functions:

Function Name Example
Sine SIN Calculates the sine in radians Example: SIN (PI/2)
Cosine COS Calculates the cosine in radians. Example: COS 1
Tangent TAN Calculates the tangent in radians. Example: TAN
Arc Sine ASIN Calculates the arc sine in radians. Example: ASIN 1
Arc Cosine ACOS Calculates the arc cosine in radians. Example: ACOS 1
Arc Tangent ATAN Calculates the arc tangent in radians. Example: ATAN 1
Absolute value ABS Returns the absolute value of the number. Example: ABS -34 returns 34
Sign SIGN Returns 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.

Name Description
CHAR Number of characters in the document
WORD Number of words in the document
PARA Number of paragraphs in the document
GRAPH Number of graphics in the document
TABLES Number of tables in the document
OLE Number of OLE objects in the document
PAGE Total number of pages in the document

More Defined Values

Description Name Value
PI PI 3.1415...
Euler's constant E 2.71828...
True TRUE not equal to 0
False FALSE 0