Le 21/04/2012 10:24, e-letter a écrit :
On 20/04/2012, Regina Henschel<[email protected]>  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.

HTH,
--
Jean-Francois Nifenecker, Bordeaux

--
For unsubscribe instructions e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to