Return to index: [Subject] [Thread] [Date] [Author]

RE: Return and array from VBA to Excel

[Subject Prev][Subject Next][Thread Prev][Thread Next]
I think this is the problem, i.e. value in ONE cell.  IIRC, you have to
enter the formula as an array formula so that each value is put into a
different cell.  

<firing up Excel>
Ok, copying this from Excel help:
Create an array formula
When you enter an array formula, Microsoft Excel automatically inserts
the formula between { } (braces). 

B. Calculate multiple results

Some worksheet functions return arrays of values, or require an array of
values as an argument. To calculate multiple results with an array
formula, you must enter the array into a range of cells that has the
same number of rows and columns as the array arguments have.

Select the range of cells in which you want to enter the array formula. 
Type the array formula.
For example, given a series of three sales figures (column B) for a
series of three months (column A), the TREND function determines the
straight-line values for the sales figures. To display all of the
results of the formula, it is entered into three cells in column C
(C1:C3).

 

B.1 Array formula that produces multiple results 

When you enter the formula =TREND(B1:B3,A1:A3) as an array formula, it
produces three separate results (22196, 17079, and 11962), based on the
three sales figures and the three months.

Press CTRL+SHIFT+ENTER.


HTH,
Mark

******* ****** ******* ******** ******* ******* ******* ***
*   Read list FAQ at: http://www.seaint.org/list_FAQ.asp
* 
*   This email was sent to you via Structural Engineers 
*   Association of Southern California (SEAOSC) server. To 
*   subscribe (no fee) or UnSubscribe, please go to:
*
*   http://www.seaint.org/sealist1.asp
*
*   Questions to seaint-ad(--nospam--at)seaint.org. Remember, any email you 
*   send to the list is public domain and may be re-posted 
*   without your permission. Make sure you visit our web 
*   site at: http://www.seaint.org 
******* ****** ****** ****** ******* ****** ****** ********