SUBNM

SUBNM returns the element of a dimension subset corresponding to the IndexOrName argument. If you include the optional Alias parameter to this function, the function returns the alias for the selected element.

When you double-click a cell containing a SUBNM function, the Subset Editor opens. You can then select a new element to place in your worksheet. The selected element becomes the return value of the SUBNM function, and the function automatically updates the IndexOrName argument to reflect the new element.

This worksheet function is valid in worksheets only.

Syntax

SUBNM(Dimension, Subset, IndexOrName, [Alias])

Argument

Description

Dimension

A valid dimension name.

Subset

The name of a subset of the dimension.

IndexOrName

An index into the subset or the name of an element in the subset.

If an index, a positive integer less than or equal to the total number of elements in the specified subset. If a name, a string representing the name of an element of the subset.

Alias

The name of an alias that exists for the subset. This is an optional argument. If it is used, the specified alias is applied when the Subset Editor opens and the function returns the alias for the selected element.

Example

SUBNM("Region","Top Producers",2)

The Top Producers subset of the Region dimension contains the ordered elements United States, Germany, Great Britain, and Mexico. Because the Index argument points to the second element in the subset, the example returns Germany.

SUBNM("Region","Top Producers","Germany","Deutsch")

This example returns the Deutsch alias for the Germany element (Deutschland) from the Top Producers subset of the Region dimension.