+ Reply to Thread
Results 1 to 11 of 11

Matrix Multiplication in VBA

  1. #1
    Registered User
    Join Date
    03-05-2014
    Location
    Iran
    MS-Off Ver
    Excel 2010
    Posts
    20

    Matrix Multiplication in VBA

    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
    Last edited by Milade8080; 03-13-2014 at 06:04 AM.

  2. #2
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Matrix Multiplication in VBA

    can you upload your example (as excel file)?
    Click on the star if you think I helped you

  3. #3
    Registered User
    Join Date
    03-05-2014
    Location
    Iran
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Matrix Multiplication in VBA

    In other words,I do not want the formula MMULT to use because it requires the selection element has.
    Attached Files Attached Files
    Last edited by Milade8080; 03-13-2014 at 06:24 AM.

  4. #4
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Matrix Multiplication in VBA

    I did not need the file, sorry for requesting it.

    find attached the solution, I hope it meets your needs.
    Attachment 304067

  5. #5
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Matrix Multiplication in VBA

    I forgot to add a button. What you can do is press Alt-F8 and then run the macro MultiplyMatrices.

  6. #6
    Registered User
    Join Date
    03-05-2014
    Location
    Iran
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Matrix Multiplication in VBA

    Tank you,Tank you ...You're so clever

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Matrix Multiplication in VBA

    Is this how you wanted?
    Please Login or Register  to view this content.

  8. #8
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Matrix Multiplication in VBA

    Milade
    If the answers solved your problem, do not forget to mark the post [SOLVED]. You may also give reputation points to whoever helped you.

  9. #9
    Registered User
    Join Date
    03-05-2014
    Location
    Iran
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Matrix Multiplication in VBA

    Tanks
    Solved

  10. #10
    Registered User
    Join Date
    05-22-2014
    Posts
    2

    Re: Matrix Multiplication in VBA

    Quote Originally Posted by adyteo View Post
    I did not need the file, sorry for requesting it.

    find attached the solution, I hope it meets your needs.
    Attachment 304067
    Do you have the excel sheet/macro? I can't find it attached. Please post it. I need to perform matrix multiplication without using MMULT. The issues is that I have a large square matrix (5000 x 5000) and MMULT fails in that scenario.

  11. #11
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,598

    Re: Matrix Multiplication in VBA

    hsee,
    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Ben Van Johnson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Matrix Multiplication
    By Jeff in forum Excel General
    Replies: 1
    Last Post: 01-18-2006, 04:20 PM
  2. [SOLVED] matrix multiplication
    By Daniel CHEN in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-06-2005, 07:05 AM
  3. matrix multiplication
    By Carine in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  4. [SOLVED] matrix multiplication
    By Carine in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  5. matrix multiplication
    By Carine in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-06-2005, 03:05 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1