You are here: Features > Cell Functions > Mathematical and Financial Functions > TOTAL function

TOTAL Function

The TOTAL function calculates the sum of a range of cell values.

Syntax

TOTAL(first cell..last cell,<step>,<argument>)

The first and last cells denote the range to be totalled.

<step> and <argument> are optional. <step> specifies if cells should not be included. Its value indicates the increment the function makes while choosing which cells to include in its calculation. The default value is 1 (include all).

<argument> controls what value types are included. The default behaviour is to sum the content of all the cells in the given range.

Valid values for <argument> are as follows:

Argument

Result

0

The function returns the count of all cells in the range.

1

The function returns the count of all cells in the range that have a non-zero value.

2

The function returns the sum of all cells in the range that have a positive value.

3

The function returns the sum of all cells in the range with a negative value.

A cell with a zero value is a cell that is empty or that contains a blank.

Notes

  • If the argument is used then a constant must be specified.
  • If the cells are alphanumeric, the TOTAL function returns zero as the value.

Example 1

TOTAL(c1..c9)

Returns the sum of all cells numbered c1 to c9.

Example 2

TOTAL(c2..c10,2)

Returns the sum of cells numbered c2, c4, c6, c8, c10.

Example 3

TOTAL(c2..c10,1,1)

Returns the count of all non-zero value cells in the range c2 to c10.

A detailed example is available.

Related Topics