Sum above in table

In my old Word document tables =SUM(ABOVE) was very handy. The only thing like this I have found in Libre Writer is sum with absolute cell references, which is much less convenient. It seems that Calc can do this with relative cell references when Options > LibreOffice Calc > General “Expand references when new columns/rows are inserted” is enabled. Is there anything similar for tables in Writer documents?

If you insert a row between the first and last rows of your summed column, then the references expand so the SUM includes that row. If you add a row after the end of the addends then it won’t be included in the SUM, this is just like a spreadsheet.

It is easy enough to to press F2 to modify the equation by entering the final number or by dragging down the column again. You could instead add an extra empty row that is included in the summation for the only purpose of adding extra rows above it.

If you want to copy a formula down a column, select the entire cell by selecting the neighbour as well then dragging back so the entire cell is highlighted. Copy the highlighted, select the other cell which need the same relative formula and paste.

1 Like

Thank you. It works. I hadn’t tried such a simple thing because I had read in Libre Writer Guide chapter 9 Working with Tables, “Unlike in Calc, when inserting or deleting rows or columns of the table, formulas are not updated automatically. If you plan to use complex formulas you should consider embedding a Calc spreadsheet in your Writer document.” This seems to contradict what you have said and which my testing confirms. Am I misreading the document or is my copy obsolete?

You quickly get to the limits of Writer’s table calculation abilities. For simple formulas it’s fine and is sufficient for a lot of uses.

From memory, Writer’s tables have always been able to update when rows are inserted like that, just like WordPro.

Mistakes are possible. E.g., like tdf#159499.