Home
DistributeCellCollection
This function provides a technique to group column values into a smaller number of columns, or spread a value out over a larger number of columns.

Syntax:

DistributeCellCollection, distribution, pageIndex, param2

Parameters:

distribution - how to distribute the values { byRatio, byAverage }

pageRef – page index to use as a reference

param2 – currently unused, provide { 0 }

Examples:

DistributeCellCollection,byRatio,0,0

Looks at the number of columns in the page identified by page index zero (the first page). It determines relative proportion of values that make up the row sum in page index zero. Then it calculates the sum of the same row on the current page and divides it into the same number of columns as page zero. Each column is weighted by the ratio that was determined on page zero.

Comments:

If the reference page has twice as many columns as the source page, ByRatio divides each source value across two columns in the reference, while ByAverage spreads the sum of the entire row evenly across the columns of the reference.

 
< Prev   Next >

Reference