COUNT macro

The COUNT macro is available only in Unica Campaign.

Syntax

COUNT(data)

Parameters

data

The cell range to count the number of cells in. This can be a constant value, a column, a cell range, or an expression evaluating to any of the above. For the format definition of data, see the "Macro Function Parameters" section in the chapter in this guide for your product.

Description

COUNT counts the number of values in the specified data range. It returns a new column containing a single value representing the number of cells containing values within the specified data range.

Note: Counting a blank column returns zero.

Examples

TEMP = COUNT(AVG(V1:V5))

Creates a new column named TEMP containing a single value of one (the function AVG returns a single cell in the default mode).

TEMP = COUNT(V1)

Creates a new column named TEMP containing a single value indicating the number of cells containing values in column V1.

TEMP = COUNT(V1:V3)

Creates a new column named TEMP containing a single value indicating the number of cells containing values in columns V1, V2, and V3.

TEMP = COUNT(V1[10:20])

Creates a new column named TEMP containing the value 11 (ranges are inclusive), given that the cells all contain values.

TEMP = COUNT(V1[1:5]:V4)

Creates a new column named TEMP containing the value 20 (5 cells in each column times 4 columns = 20 cells), given that all the cells contain values.

TEMP = COUNT(V1[1:10])

Creates a new column named TEMP containing the value 3, given that rows 1-3 of column V1 contain values and rows 4-10 are empty.

Related functions

Function Description
SUM or TOTAL Computes the sum of a range of cells