Tuesday, November 12, 2019

Calculations inside of Writer tables

Possibly, not all people know it can to make calculations inside Writer tables like in the Calc. But there are only 25 functions for use inside Writer tables, but Calc has over 400 functions.
To start use functions inside Writer tables you should left click into cell and then press key F2 or "=" on keyboard, or use "Formula" icon on Table toolbar. It shows a Formula bar like in the Calc.
There are Cell address field, Functions drop-down list, Cancel button, Apply button, Formula field on that bar.
Note, links to cells in Writer tables look as <A1> or <B3>. Cell ranges look as <A1:A10> or <A1:D12>.
After the Formula bar appeared you can select functions from drop-down list or can write a formula manually inside the Formula field after equal sign at once.
You can make calculates not only inside one Writer table. You can use values from many tables inside one Writer document. Use link to cell with table name like <Table2.A1>.
Attention! If you made in your formula a link to cell from another table and then changed that table's name, then you'll see an error in the cell like "** Expression is faulty **"! So, you should rename all your tables before you start create formulas inside these tables.
MS Word allows calculations in its native table too. But there are some differences between MS Word and LO Writer in that case.
First - difference between functions sets:

LibreOffice Writer table`s functions
MS Word table`s functions
SUM
SUM
ROUND
ROUND
PERCENT -
SQUARE ROOT -
POWER -
LIST SEPARATOR -
EQUAL -
NOT EQUAL -
LESS THAN OR EQUAL -
GREATER THAN OR EQUAL -
LESS -
GREATER -
BOOLEAN OR
OR
BOOLEAN XOR -
BOOLEAN AND
AND
BOOLEAN NOT
NOT
MEAN
AVERAGE
MINIMUM
MIN
MAXIMUM
MAX
SINE -
COSINE -
TANGENT -
ARCSINE -
ARCCOSINE -
ARCTANGENT -
COUNT (starting from 7.1)
COUNT
ABS (starting from 7.1)
ABS
-
DEFINED
-
FALSE
-
IF
-
INT
-
MOD
PRODUCT (starting from 7.1)
PRODUCT
SIGN (starting from 7.1)
SIGN
-
TRUE

Second - in the Writer you type a formula into Formula bar like in the Calc, but in the MS Word you type a formula into the different dialog window.
Third - you can click on cells in the Writer tables when you create a formula, but in the MS Word you can't make it
Fourth - Writer can automatically recalculate result of formula when you change source values, but MS Word can't.
ps: if there is a formula inside a Writer table, then you'll never know about it wihout tooltip! Cell with formula looks like any another cell without formula in the table=(

5 comments:

  1. Is there a way to drag the formula across a set of rows? And have to update the used values? Like in excel/calc?

    ReplyDelete
  2. drag no, but you can try select full cell and copy it, and then paste it into other cells

    ReplyDelete
  3. Can variables be used in formulae?

    Very common use case in proposals / invoices etc etc: define a labour rate in one place (eg Insert -> Fields -> More Fields -> Variables tab -> User Fields) then table rows define items with num hrs, and a total which is labour rate * num hrs. Then the totals col is summed.

    Must be a way to do this without repeating the rate in each row ...

    ReplyDelete
    Replies
    1. Yeah, just create a variable as you wrote but use Variable tab and Set variable item instead User fields. Enter a name for your variable and its value. Then use a variable's name inside your formula. It works, I've checked it

      Delete
  4. Anonymous2:43 PM

    how to use round functions in libreoffice writer

    ReplyDelete

All comments will be preliminary check