How to obtain multiple quantities from an Excel VB function?
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! |
How to obtain multiple quantities from an Excel VB function?
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. -- Regards, Tom Ogilvy "Tom Kreutz" wrote in message om... 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! |
All times are GMT +1. The time now is 02:59 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com