creating Arrays from addin functions

S

Steve Lloyd

Can anyone help me in returning a formula array from a worksheet function.

I have a worksheet function that successfully populates an array and works
fine provided that the formula is entered using Ctrl + Shift + Enter.
However, this is far too complicated for the users and i want the array to
be populated vertically starting at the cell where the formula was entered.
sounds simple enough but is giving me great headaches.

In short when they type =ArrayFunction(CellReference) i want the array to
start in that cell and populate the results vertically with the seperate
values in each cell.

Confused ?? me too !

any help is much appreciated.

Thanks

Steve.
 
B

Bob Phillips

Steve,

Does this help

Function ArrayFunction(cell As Range)
Dim ary
ary = Range(cell, Cells(Rows.Count, cell.Column).End(xlUp))
'rest of code
End Function


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top