How to obtain multiple quantities from an Excel VB function?

T

Tom Kreutz

I have an Excel VB function that performs a rather long computation
(it calls a big Fortran .dll) and I would like to extract more than a
single quantity from each calculation.

In my naive conception of an Excel VB function, one feeds it input
parameters, and it returns a single function value. I've attempted to
output multiple quantities by setting the value of various named
ranges within the function, but this doesn't seem to work. (I suspect
that this sort of thing could seriously undermine Excel's dependency
tree.)

Is there a proper way to have a single function call return more
than one value?

Many thanks,

Tom Kreutz

P.S. My apologies if the query shows up more than once; this is my
third time posting it in two days, and it has yet to appear!
 
T

Tom Ogilvy

Same way as you would do it for built in functions that support it. You
would have the function return an array and you would have to array enter
formula. So if you want to return a table of values (a rectangular area)
this will work.
 

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