View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default multplying matrix with constant doesn't work in VBA

You'll just have to loop through the rows and columns to multiply each
matrix element individually.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


wrote in message
ps.com...
I have a matrix like this...

12 4 22
2 1 33
54 2 9


...and the following function...


Function myfunc(m)


myfunc = 2 * m


End Function


Passing on the matrix to exactly this funciton (letter by letter) in
Excel 2003 SP2 results in #VALUE!


Why? What is wrong here? My guess is that some data type definitions
are missing. Can somebody help?