Function documentationEvSUM and EvSUB Locate this document in the navigation structure

 

You can place a keyword, EvSUM, in the data range portion of a before or after range. When the system performs the expansion, it automatically turns this keyword into an Excel formula that calculates the sum of the members of the related expansion. You can nest EvSUM instructions within the related before or after ranges.

A newer variation of the EvSUM keyword is EvSUB, which has similar behavior, but provides more flexibility to the mathematical operations used in the expanded range. EvSUB inserts the Excel function SUBTOTAL into the appropriate cells and identifies the type of mathematical operation you want performed on the range of cells.

Syntax Syntax

  1. = SUBTOTAL(function_num,ref1,ref2,...)
End of the code.

Function_num is the number 1 to 11 (includes hidden values) or 101 to 111 (ignores hidden values) that specifies which function to use in calculating subtotals within a list.

Function_num

(Includes hidden values)

Function_num

(Ignores hidden values)

Function

1

101

AVERAGE

2

102

COUNT

3

103

CONTRA

4

104

MAX

5

105

MIN

6

106

PRODUCT

7

107

STDEV

8

108

9

109

10

110

11

111

Example

The instruction EvSUB(2) inserts the Excel function SUBTOTAL(2,{range}) into the sheet, and the function returns the number of elements in the {range} (using the COUNT operation, as triggered by the value 2 of the identifier). Passing no parameter to EvSUB corresponds to passing a 9, which represents the SUM operation.