Results 1 to 9 of 9

Thread: VBA code for Matrix Multiplication

  1. #1

    Question VBA code for Matrix Multiplication



    Register for a FREE account, and/
    or Log in to avoid these ads!

    sheet 1 ----> [Matrix A]m*n Current Region for start --->cell A1
    sheet 2 ----> [Matrix B]n*k Current Region for start --->cell A1

    sheet 3 ----> [Matrix A]*[Matrix B]

    I need to VBA code for Matrix Multiplication in sheet3 ,Just by pressing a button key (
    In other words, no need to pick out the array of the matrix)

    Can someone help me? Tanks

  2. #2
    Acolyte patel's Avatar
    Join Date
    Feb 2014
    Location
    Italy
    Posts
    59
    Articles
    0
    can you attach a sample file ? just an example
    Code:
    Sub RangeMultiply()
      Sheet3.Range("A1:E3") = Evaluate("Sheet1!A1:E3*Sheet2!A1:E3")
    End Sub

  3. #3
    Do you mean SUMPRODUCT or MMULT in Excel function terms?

  4. #4
    Quote Originally Posted by Bob Phillips View Post
    Do you mean SUMPRODUCT or MMULT in Excel function terms?


    In other words,I do not want the formula MMULT to use because it requires the selection element has.

  5. #5
    Sorry, I don't understand that.

  6. #6
    Tanks
    Soved

  7. #7

    solved

    hi
    this post solved

  8. #8

  9. #9
    Ah cross-posting, glad I didn't waste any time on that then.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •