Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index

On 04/21/2012 05:51 AM, Jean-Francois Nifenecker wrote:
Le 21/04/2012 10:24, e-letter a écrit :
On 20/04/2012, Regina Henschel<>  wrote:
SUM( { NumberSequenceList N }+ )

e.g. SUM(a1+b2)

No. it would be SUM(a1;b2)

It would be better if calc returned an error, stating incorrect syntax

I'm afraid it is *not* incorrect syntax. Likewise, SUM(5) is correct syntax as well.

The question is general because a general understanding is required!
The example concerns only integers, e.g. where a1=1 and b2=2, the
results are correct, but the question is about learning the correct
syntax so that formula entered in a calc spreadsheet will not be lost
or corrupted when the spreadsheet is opened in another odf compliant
software, e.g. gnumeric. I don't want to use a sum syntax such as
(a1+b2), which gives the correct result, but if opened in another
program, the formula is lost or gives an incorrect answer.

All spreadsheet software I know of are accepting the syntax above. Of course, the syntax to use is preferably SUM(A1:A10), ie using a cell range rather than discrete cell references, but the latter can be useful (see 3. below).

So the following are all syntactically correct:

1. SUM(A1:A10)
-> returns the sum of the numerical values within the range. Non-numeric values are ignored.

2. SUM(A1:A10;Z1:Z10)
-> like 1, with multiple ranges.

3. SUM(A1;B2;Z15)
-> returns the sum of several cells. Non-numeric values are ignored, opposite to what A1+B2+Z15 would return (see Regina's answer).

...and any combination of the previous.
I think the above syntax was developed for Lotus 123 in the early 80's(?) and everyone else implemented the rules/syntax to be compatible with Lotus. By the mid 80's this syntax was standard for all spreadsheets.

The only real change from Lotus is that (using 1) is in Lotus formulas were enter +SUM(A1:A10) while the IMHO the more logical =SUM(A1:A10) was introduced later by the mid 80's.


Jay Lozier

For unsubscribe instructions e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.