Skip to main content

sum

Sums the input values.

You can sum individual numbers, numeric lists, or a mix of both.

To get the sum total for a table region — e.g. a column or multi-column region — use totalVal instead.

Parameters

  • X (number or list)

    A number or numeric list to sum.

  • Y (number or list)

    A number or numeric list to sum.

    You can add more numbers or lists as required.

Examples

The function can sum individual numbers.

ATL in Script

Result

[[sum(459000, 489000)]]

948,000

[[sum(-6, 2.9, 3.45, 1500)]]

1,500.35

The function can sum the values in a numeric list.

ATL in Script

Result

[[sum((12, 48, 59, 43, 37, 24, 89))]]

312

[[myList = (10, 34, 267, 41); sum(myList)]]

352

The input can be a mix of individual numbers and numeric lists.

ATL in Script

Result

[[sum(75, (1, 5, 3), (3, 7, 3), 10, 20)]]

127