View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gabriel[_3_] Gabriel[_3_] is offline
external usenet poster
 
Posts: 17
Default Matrix Multiplication Function creation

Hello,

I want to create a function in vba that performs the following
calculation:

{=MMULT(A,B)}

A B A*B

1 3 4 6 19 27
2 4 5 7 28 40


I want to select the appropriate range,the function box to pop up so
that I could select A then B and then get the same result that I've
obtained in worksheet.

Function AxB (A,B) as variant
AxB = Application.WorksheetFunction.MMult(A, B)
End Function

What should I change or add to the above function to do what should be
done?

Thank you in advance
Gabriel