Performing calculations in a table within a text document

From NeoWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 05:46, 2 February 2007 (edit)
Sardisson (Talk | contribs)
(Calculations in a table within a text document - new image)
← Previous diff
Current revision (13:56, 9 February 2007) (edit) (undo)
RoyFocker (Talk | contribs)
m (Calculating with data from cells belonging to different tables - link to spanish version)
 
(3 intermediate revisions not shown.)
Line 1: Line 1:
-{{fixme}} 
==Calculations in a table within a text document== ==Calculations in a table within a text document==
-In [[NeoWriter]], the word processing component, is possible to make simple calculations directly inside a table, without having to insert a Calc spreadsheet as an OLE object.+In [[NeoWriter|NeoOffice Writer]], the word processing component, is possible to perform simple calculations directly inside a table, without having to insert a Calc spreadsheet as an OLE object.
[[Image:TableFormulas.png|right|List of mathematical functions usable within a table]] [[Image:TableFormulas.png|right|List of mathematical functions usable within a table]]
Line 17: Line 16:
<br> <br>
-==Copy a formula to other table cells==+==Copying a formula to other table cells==
-It's possible to copy and paste a formula from a cell to others, keeping relative references. I'm going to explain this. Let's have a table with 5 rows and 3 coloumns. In cell A1 type 1; in cell B1 type 2; in cell C1 insert a formula, i.e. "=A1+B1" (without “; you could also not type A1 and B1: to insert the cell reference in a formula, after you have typed "=" or after you have hitted {{key|F2}} key, click on cell A1, then hit {{key|+}} key and than click on cell B1).+It's possible to copy and paste a formula from one cell to other cells, keeping relative references. For example, take a table with 5 rows and 3 columns:
-Now if you want to repeat the same calculation in cells from C2 to C5 you can do the following:+# In cell, A1 type <tt>1</tt>, and in cell B1, type <tt>2</tt>
-*click on cell C1;+# In cell C1, insert a formula, ''i.e.'' type <tt>=<A1>+<B1></tt>
-*holding down the (left) mouse button, move to B1 cell and then back to C1: the entire and only C1 cell will be highlighted;+#* You could also not type <tt><A1></tt> and <tt><B1></tt>; to insert the cell reference in a formula, after typing <tt>=</tt> or after pressing the {{key|F2}} key, click on cell A1, then hit the {{key|+}} key, and then click on cell B1.
-*do a copy as you usually do:+#To repeat the same calculation in cells C2 to C5, first click on cell C1.
-**from menu {{menu|Edit/Copy}}; or+#While holding down the (left) mouse button, move to cell B1 and then back to cell C1 (all of cell C1, and only that cell, will be highlighted).
-**hitting the “copy” icon in Standard toolbar; or+# Copy as you usually do:
-**hitting simultenously {{key|⌘}} and {{key|c}} keys.+#*By choosing {{menu|Copy}} from the {{menu|Edit}} menu; or
-*Now, select cells from C2 to C5 and+#*Pressing the “Copy” icon in the Standard toolbar; or
-*paste clipboard content as you usually do:+#*Pressing {{key|⌘-C}}.
-**from menu {{menu|Edit/Paste}}; or+# Now select cells C2 to C5.
-**hitting the “paste” icon in Standard toolbar; or+# Finally, paste the clipboard contents as you usually do:
-**hitting simultenously {{key|⌘}} and {{key|v}} keys.+#*By choosing {{menu|Copy}} from the {{menu|Edit}} menu; or
 +#*Pressing the “Paste” icon in the Standard toolbar; or
 +#*Pressing {{key|⌘-V}}.
<br> <br>
 +
==Calculating with data from cells belonging to different tables== ==Calculating with data from cells belonging to different tables==
-In NeoOffice Writer, it is possible to perform calculations using data that are written in different tables.+In NeoOffice Writer, it is also possible to perform calculations using data that are in different tables.
-To do this you have to know (or remember) that NeoOffice numbers the tables you insert in a text document in a progressive order. Say you have inserted a number in cell B2 of the first table, and a number in cell A3 of the second table and want to make a calculation involving these two numbers and put the result in a cell of a third table. You can do so by following these instructions:+To do this you have to know (or remember) that NeoOffice numbers the tables you insert in a text document in a progressive order. For example, there is a number in cell B2 of the first table, a number in cell A3 of the second table, and you want to make a calculation involving these two numbers and put the result in a cell of a third table. You can do so by following these instructions:
-*click on the cell of the table where you want the result displayed;+#Click on the cell of the table where you want the result displayed.
-*type {{key|=}} or {{key|F2}};+#Type <tt>=</tt> or press {{key|F2}}.
-*insert the formula, for example for a sum, you can either:+#Insert the formula; for example, for a sum, you can either:
-**type <tt><Table1.B2>+<Table2.A3></tt> and hit {{key|Enter}} key; or+#*Type <tt><Table1.B2>+<Table2.A3></tt> and hit the {{key|Enter}} key; or
-**click on cell B2 of table 1, type {{key|+}}, click on cell A3 of table 2 and hit {{key|Enter}} key.+#*Click on cell B2 of Table 1, type {{key|+}}, click on cell A3 of table 2, and hit the {{key|Enter}} key.
<br> <br>
-If you are inserting the formula in a cell of table 1 you can omit "Table1" before cell reference (in this case B2); again, if the formula is being inserted in a cell of table 2, you can omit to type "Table2" before cell reference (in this case A3).+You can omit the table number before references to cells that are in the same table as the forumla; ''e.g.'', if you are inserting the formula in a cell in Table 1, you can omit "Table1" when referring to cell B2 in the above example.
-{{botlangbarEN|[[Fr:Calculs_dans_un_tableau_d'un_document_de_texte|Français]] [[It:Calcoli_in_una_tabella_di_un_documento_di_testo|Italiano]]}}+{{botlangbarEN|[[Fr:Calculs_dans_un_tableau_d'un_document_de_texte|Français]] [[It:Calcoli_in_una_tabella_di_un_documento_di_testo|Italiano]] [[Es:C%C3%A1lculos_en_una_tabla_de_Writer|Español]]}}
[[Category:NeoOffice]][[Category:Tips and Hints]] [[Category:NeoOffice]][[Category:Tips and Hints]]

Current revision

Calculations in a table within a text document

In NeoOffice Writer, the word processing component, is possible to perform simple calculations directly inside a table, without having to insert a Calc spreadsheet as an OLE object.

List of mathematical functions usable within a table

In order to do this, you need to:

  1. Insert a table as you usually do.
  2. Type data in the table cells.
  3. Then click on the cell where you want to insert a calculation or formula.
  4. To insert the formula, you can either:
    • Press the F2 key; or
    • Type = directly inside the cell
  5. An area for formula entry will appear in the toolbar, just above the top of the page (like in Calc); after the = sign, type the formula you wish to use;
  6. Then hit the enter key


Mathematical functions that you can use for formulas can be typed directly or chosen from the list that is shown when clicking on Formula icon in the toolbar that appears (on the left of the formula-typing field).

Copying a formula to other table cells

It's possible to copy and paste a formula from one cell to other cells, keeping relative references. For example, take a table with 5 rows and 3 columns:

  1. In cell, A1 type 1, and in cell B1, type 2
  2. In cell C1, insert a formula, i.e. type =<A1>+<B1>
    • You could also not type <A1> and <B1>; to insert the cell reference in a formula, after typing = or after pressing the F2 key, click on cell A1, then hit the + key, and then click on cell B1.
  3. To repeat the same calculation in cells C2 to C5, first click on cell C1.
  4. While holding down the (left) mouse button, move to cell B1 and then back to cell C1 (all of cell C1, and only that cell, will be highlighted).
  5. Copy as you usually do:
    • By choosing Copy from the Edit menu; or
    • Pressing the “Copy” icon in the Standard toolbar; or
    • Pressing ⌘-C.
  6. Now select cells C2 to C5.
  7. Finally, paste the clipboard contents as you usually do:
    • By choosing Copy from the Edit menu; or
    • Pressing the “Paste” icon in the Standard toolbar; or
    • Pressing ⌘-V.


Calculating with data from cells belonging to different tables

In NeoOffice Writer, it is also possible to perform calculations using data that are in different tables. To do this you have to know (or remember) that NeoOffice numbers the tables you insert in a text document in a progressive order. For example, there is a number in cell B2 of the first table, a number in cell A3 of the second table, and you want to make a calculation involving these two numbers and put the result in a cell of a third table. You can do so by following these instructions:

  1. Click on the cell of the table where you want the result displayed.
  2. Type = or press F2.
  3. Insert the formula; for example, for a sum, you can either:
    • Type <Table1.B2>+<Table2.A3> and hit the Enter key; or
    • Click on cell B2 of Table 1, type +, click on cell A3 of table 2, and hit the Enter key.


You can omit the table number before references to cells that are in the same table as the forumla; e.g., if you are inserting the formula in a cell in Table 1, you can omit "Table1" when referring to cell B2 in the above example.


This article in other languages: Français Italiano
Personal tools