ROUND macro

The ROUND macro is available only in Unica Campaign.

Syntax

ROUND(data)

Parameters

data

The numerical values to round. 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

ROUND rounds the values in the specified data range to the nearest integer. It returns one new column for each input column, each containing the rounded value of numbers in the corresponding input column. Numbers exactly halfway in-between are rounded up (for example, 2.5 is rounded to 3.0 and 2.5 is rounded to -2.0).

Examples

TEMP = ROUND(3.2)

Creates a new column named TEMP containing the value three.

TEMP = ROUND(V1)

Creates a new column named TEMP, where each value is the rounded value of the contents of column V1.

TEMP = ROUND(V1:V3)

Creates three new columns named TEMP, VX, and VY. The values in the TEMP column are the rounded values of the contents of column V1, the values of the VX column are the rounded values of the contents of column V2, and the values of the VY column are the rounded values of the contents of column V3.

TEMP = ROUND(V1[10:20])

Creates a new column named TEMP, where the first 11 cells contain the rounded values in rows 10-20 of column V1. The other cells in TEMP are empty.

TEMP = ROUND(V1[1:5]:V2)

Creates two new columns named TEMP and VX, each with values in rows 1-5 (the other cells are empty). The values in column TEMP are the rounded values of the corresponding rows of column V1, and the values in column VX are the rounded values of the corresponding rows of column V2.

Related functions

Function Description
INT Computes the integer value (rounded down) of the contents of the specified data range
MOD Computes the modulo of the contents of the specified data range
TRUNCATE Returns the non-fractional part of each value in the specified data range