From e1165b2f11d933a273f13631e400f9ad5980d134 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Tue, 8 Sep 2020 08:39:41 -0300 Subject: tdf#136510 New Writer table functions PRODUCT, ABS. PRODUCT, ABS, COUNT, SIGN Change-Id: I14d33cbb101ee7146bc54d73121805c883dfe7bc Reviewed-on: https://gerrit.libreoffice.org/c/help/+/102248 Tested-by: Jenkins Reviewed-by: Olivier Hallot --- source/text/scalc/01/04060199.xhp | 153 +++++++------ source/text/swriter/02/14020000.xhp | 412 +++++++++++++++++++++++------------- 2 files changed, 342 insertions(+), 223 deletions(-) (limited to 'source') diff --git a/source/text/scalc/01/04060199.xhp b/source/text/scalc/01/04060199.xhp index 2928f11e99..5ad22dbed5 100644 --- a/source/text/scalc/01/04060199.xhp +++ b/source/text/scalc/01/04060199.xhp @@ -1,7 +1,4 @@ - - - - - - + Operators in $[officename] Calc @@ -39,261 +34,261 @@ comparisons;operators in Calc arithmetical operators reference operators -mw added 7 new index entriesOperators in $[officename] Calc +mw added 7 new index entries

Operators in $[officename] Calc

You can use the following operators in $[officename] Calc: -Arithmetical Operators +

Arithmetical Operators

These operators return numerical results. - + Operator - + Name - - + + Example - + + (Plus) - + Addition - + 1+1 - + - (Minus) - + Subtraction - + 2-1 - + - (Minus) - + Negation - + -5 - + * (asterisk) - + Multiplication - + 2*2 - + / (Slash) - + Division - + 9/3 - + % (Percent) - + Percent - + 15% - + ^ (Caret) - + Exponentiation - + 3^2
-Comparative operators +

Comparative operators

These operators return either true or false. - + Operator - + Name - - + + Example - + = (equal sign) - + Equal - + A1=B1 - + > (Greater than) - + Greater than - + A1>B1 - + < (Less than) - + Less than - + A1<B1 - + >= (Greater than or equal to) - + Greater than or equal to - + A1>=B1 - + <= (Less than or equal to) - + Less than or equal to - + A1<=B1 - + <> (Inequality) - + Inequality - + A1<>B1
-Text operators +

Text operators

The operator combines separate texts into one text. - + Operator - + Name - - + +Example - + & (And) - + text concatenation AND text concatenation AND - + "Sun" & "day" is "Sunday"
-Reference operators +

Reference operators

These operators return a cell range of zero, one or more cells. Range has the highest precedence, then intersection, and then finally union. - + Operator - + Name - - + + Example - + : (Colon) - + Range - + A1:C108 - + ! (Exclamation point) - + intersection operator Intersection - + SUM(A1:B6!B5:C12) Calculates the sum of all cells in the intersection; in this example, the result yields the sum of cells B5 and B6. - + ~ (Tilde) - + Concatenation or union - + 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. See note below this table.
-Reference concatenation using a tilde character was implemented lately. When a formula with the tilde operator exists in a document that is opened in old versions of the software, an error is returned. A reference list is not allowed inside an array expression. +Reference concatenation using a tilde character was implemented lately. When a formula with the tilde operator exists in a document that is opened in old versions of the software, an error is returned. A reference list is not allowed inside an array expression.
diff --git a/source/text/swriter/02/14020000.xhp b/source/text/swriter/02/14020000.xhp index 4526bdf4ec..0a65781327 100644 --- a/source/text/swriter/02/14020000.xhp +++ b/source/text/swriter/02/14020000.xhp @@ -1,7 +1,4 @@ - - - - - - + Formula @@ -30,505 +25,634 @@
-operators; in formulas -statistical functions -trigonometric functions -pages;number of -variables;document properties + +formulas; in text documents +operators; in table formulas +statistical functions in tables +mathematical functions in tables +trigonometric functions in tables +pages;number of pages in table formulas +variables;document properties in table formulas arithmetical operators in formulas -Formula +

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 F2 +In the Table toolbar, press the Formula icon.
- + -Icon - +Formula icon in Table toolbar - + Formula
-Summary of Formula Options -Basic Calculation Functions +
+

Summary of Formula Options

+

Basic Calculation Functions

- - + + + Operation + + + Name + + + Example + + + + Addition - + + - + Calculates the total. Example: <A1> + 8 - + Subtraction - + - - + Calculates the difference Example: 10 - <B5> - + Multiplication - + MUL or * - + Calculates the product. Example: 7 MUL 9 - + Division - + DIV or / - + Calculates the quotient Example: 100 DIV 15
-Basic Functions in the Submenu +

Basic Functions in the Submenu

+ + + Function + + + Name + + + Example + + + - + Sum - + SUM - + Calculates the sum of the selected cells. Example: SUM <A2:C2> 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 +

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|50|<C6>|<A2:B6>|20 - + Equal - + EQ 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 Equal - + NEQ or != - + Tests for inequality between selected values. Example: <A1> NEQ 2 displays 0 (wrong), if the content of A1 equals 2. - + Less than or Equal - + LEQ - + Tests 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 Equal - + GEQ - + Tests for values greater than or equal to a specified value Example: <A1> GEQ 2 displays 1 (true), if the content of A1 is greater than or equal to 2. - + Less - + L - + Tests for values less than a specified value Example: <A1> L 2 displays 1 (true), if the content of A1 is less than 2. - + Greater - + G - + Tests for values greater than a specified value Example: <A1> 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 +

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|20 displays 20 - + Minimum Value - + MIN - + Calculates the minimum value in an area or a list. Example: MIN 10|30|20 displays 10 - + Maximum Value - + MAX - + Calculates the maximum value in an area or a list. Example: MAX 10|30|20 displays 30.00 + + + Product + + + PRODUCT + + + Calculates the product of the selected cells. + Example: PRODUCT <A2:C2> displays the product of the values in cells A2 to C2 + + + + + Count + + + COUNT + + + Counts the number of non empty cells. + Example: COUNT <A2:C2> displays the number of non empty cells in A2 to C2. + +
-Trigonometric Functions -You can choose from the following trigonometric functions: +

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 <A1> - + 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 +

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 +

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 -- cgit