XLL+ Class Library

Groups Dialog

What is the Groups dialog for?

You may want or need to group your arguments, so that several arguments appear in Excel as a single argument. Note that arguments can only be grouped if they have zero or one dimension; matrices may not be grouped.

For more information, see Groups in the User Guide.

Compressed groups

There is a limit to how many arguments you can pass to an Excel add-in function, and a function with too many arguments will not work. In this case, you must group your arguments into a compressed group.

The user of the function can input grouped arguments in one of two ways:

In either case, the wizard-generated code will extract the values from the input array, and will return helpful error messages if they are cannot be found or are badly-formed.

Column groups

You may have groups of columns which are closely related, such as a column of dates and a column of payment amounts for each date. In this case, it may make sense to group your arguments as a two-dimensional array.

The Wizard will generate code to extract your data from the grouped argument, and check that it is of the data type expected.

Elements of the dialog

Ungrouped arguments list

The left-hand list contains all the arguments that can be grouped, but have not been.

Symbol Description
An unaligned scalar (0-dimensional) argument. This can be added to a compressed group.
An unaligned vector (1-dimensional) argument. This can be added to an column group.
Groups list

The list on the right contains all the function's groups, and the inner arguments of each group.

Symbol Description
A group of vector (1-dimensional) arguments, also known as a Column group. This should appear in Excel as a two-dimensional array, with each column containing an inner argument. The code generated will check that all the columns have the same number of cells (after truncating empty cells at the bottom of the range.)
A group of scalar (0-dimensional) arguments, also known as a Compressed group. This can appear in Excel as a single vector of values, or as a two-column array, with inner argument names in the left-hand column, and values in the right-hand column.

Note: These groups are not added to the to the function definition for increased usability - they are only used because Excel has a strict limit on the total number of a function's arguments.
Dropping an argument on to this node creates as new group.

How to use the dialog

Use the mouse to drag arguments from the left-hand list of ungrouped arguments into the list of groups.

Drag the argument onto the New group node to create a new group. (Once you have finished arranging your groups, the group will appear as just another argument, and you will be able to edit its name and other details.)

You can also drag arguments between groups, or out of a group into the list of ungrouped arguments. Groups that have no memebers will disappear.

See Also

Function Wizard | Select Group Arguments Dialog | Function Wizard Dialog | Bounded input arrays