Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

formula returns to multiple cells, without Array object?

  Asked By: Bryant    Date: Sep 19    Category: MS Office    Views: 681
  

I want to write an Excel VBA formula that would return an array of
doubles to a range of cells in Excel, without using the Array object
in VBA.
The problem, as I understand, is that the Array object needs the
arglist to be comma separated. I want to simply do a calculation on
an array of doubles, and return that array to Excel.
Is that possible?

Ex.
Function simple_test(returns As Range)

Dim dec3() As Double
Dim i, ct As Integer

ct = WorksheetFunction.count(returns)

ReDim dec3(0 To ct - 1)

For i = 0 To ct - 1
dec3(i) = returns(i)
Next i

simple_test = dec3

End Function

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on formula returns to multiple cells, without Array object? Or get search suggestion and latest updates.




Tagged: