MULT macro
The MULT
macro
is available in HCL®
Campaign and HCL
Interact.
Syntax
data MULT multiplier data *
multiplier
Parameters
data
The
numerical values to multiply. 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 HCL
product.
multiplier
The number to multiply
all values in the specified column by. This can be a constant value,
a column, a cell range, or an expression evaluating to any of the
above. The number of columns in multiplier
must
equal the number of columns in data
, unless multiplier
is a constant. For the format definition of multiplier
(same as data
), see the "Macro Function Parameters"
section in the chapter in this guide for your HCL
product.
Description
MULT
multiplies
the values in the two specified data ranges. It returns one new column
for each input column, each containing the numbers in data
multiplied by multiplier
. If multiplier
is a constant, each value in data
is multiplied by
that value. If multiplier
is a column, the calculations
are performed on a row-by-row basis. The values in data
are multiplied by the first row value of multiplier
,
the second row with the second row, and so on. This row-by-row calculation
produces a result for each row up to the last value of the shortest
column.
multiplier
is the same as using the constant x as multiplier
.MULT
operator can be abbreviated
with an asterisk ( *
).Examples
TEMP = 8 MULT 4 or TEMP = 8 * 4
Creates a new column named |
TEMP = V1 * 8 Creates
a new column named |
TEMP = V1:V3 * 2 Creates
three new columns named |
TEMP = V1 * V1 Creates
a new column named |
TEMP = V1 * V2 Creates
a new column named |
TEMP = V1:V3 * V4:V6 Creates
three new columns named |
TEMP = V1[10:20] * V2 or TEMP = V1[10:20]
* V2[1:11] Creates a new column named |
Related functions
Function | Description |
---|---|
DIV |
Divides one specified data range by another |
EXP |
Computes the natural number (e) raised to the contents of each cell in the specified data range |
POW |
Computes a base value raised to the specified exponential power(s) |