Applies from Version: | WEBcnx 2024.1 | Applies to Version: |
Description
Gets the sum of a series of specified numbers.
Syntax
SUM(number1, number2, ...)
The SUM function has the following arguments:
- number1 Required. The first in a series of specified numbers.
- number2 Required. The second in a series of specified numbers.
- Additional parameters are optional.
Returns
A Number
Examples
Expression | Description | Result |
---|---|---|
SUM() | Returns an error as no arguments are specified | Error |
SUM(1) | Returns an error as only one argument is specified | Error |
SUM(1, 2.5) | Sums up 1 and 2.5 | 3.5 |
SUM(1, -2.5) | Sums up 1 and -2.5 | -1.5 |
SUM(1, -2.5, 3) | Sums up 1, -2.5, and 3 | 2.5 |
SUM(1, -2.5, 3, -4) | Sums 1, -2.5, 3, and -4 | -2.5 |