ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA function return matrix? (https://www.excelbanter.com/excel-programming/289597-vba-function-return-matrix.html)

Steve O'Hagan

VBA function return matrix?
 
Hi,

Can a user defined VBA function return a matrix (as do built-in function
such as MINVERSE)?

--
Regards,
Steve O'Hagan



Alan Beban[_4_]

VBA function return matrix?
 
Yes.

Alan Beban

Steve O'Hagan wrote:
Hi,

Can a user defined VBA function return a matrix (as do built-in function
such as MINVERSE)?



Tom Ogilvy

VBA function return matrix?
 
in addition to Alan's excellent answer, you can look at some additional
information on Chip Pearson's page on this topic:

http://www.cpearson.com/excel/returnin.htm
Returning Arrays


--
Regards,
Tom Ogilvy

"Steve O'Hagan" wrote in message
...
Hi,

Can a user defined VBA function return a matrix (as do built-in function
such as MINVERSE)?

--
Regards,
Steve O'Hagan





Alan Beban[_4_]

VBA function return matrix?
 
I guess what was left out of both my excellent answer and Chip Pearson's
cited page is that if the function is called from the worksheet, then
to return a matrix it needs to be array entered into the appropriate
sized range, just like the built-in functions.

Alan Beban

Tom Ogilvy wrote:
in addition to Alan's excellent answer, you can look at some additional
information on Chip Pearson's page on this topic:

http://www.cpearson.com/excel/returnin.htm
Returning Arrays





All times are GMT +1. The time now is 01:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com