I have a Macro Sub that passes in "A" and "b" named ranges to "myfunc" and returns the result to the "x" named range.
Sub Calculate() MLOpen MLPutMatrix "A", Range("A") MLPutMatrix "b", Range("b") MLEvalString "x = myfunc(A, bl)" MLGetMatrix "x", "x" MatlabRequestEnd Sub
I can call this in Excel with "=Calculate()" and it populates "x", but now I want to call it like "=Calculate([rangeA], [rangeB])", where rangeA and rangeB can be any Excel range.
How can I do this with Excel Macro functions?
Best Answer