Microsoft KB Archive/62278

{|
 * width="100%"|

Excel: Returning a Horizontal Array from a Function Macro

 * }

-

The information in this article applies to:


 * Microsoft Excel for the Macintosh, versions 1.x, 2.2, 3.0, 4.0

-

SUMMARY
When a function macro computes more than one value, the computed values may be returned as an array.

Because of function macro limitations and the strict order of calculation followed for macro sheets, it is difficult to arrange computed values horizontally. This can be done with multiple GOTO statements in the macro, but it is more convenient to return the values as a vertical array. A sample RETURN statement might appear as follows:

  =RETURN(A12:A15)

On the worksheet, however, it is sometimes desirable to horizontally enter the results computed by a function macro. This can be done with the TRANSPOSE function as follows:


 * 1) Select the appropriate number of cells in a row and type a formula of the following form:

=TRANSPOSE(Macrosheet!functionmacro(arg1,arg2,...))
 * 1) Press COMMAND+ENTER to enter the formula as an array. The vertical array returned by the function macro will be entered along the row.

Additional query words: 1.0 1.00 1.03 1.04 1.06 1.5 1.50 2.20 3.0 4.00

Keywords :

Version :

Platform :

Issue type :

Technology :